def test_date(self):
        value = self.sd.date()
        self.assertTrue(isinstance(value, datetime.date))

        self.assertTrue(value >= (datetime.date.today() - datetime.timedelta(days=365)))
        self.assertTrue(value <= (datetime.date.today() + datetime.timedelta(days=365)))

        value = self.sd.date(-10, 10)
        self.assertTrue(value >= (datetime.date.today() - datetime.timedelta(days=10)))
        self.assertTrue((datetime.date.today() + datetime.timedelta(days=10)) <= value)

        with self.assertRaises(ParameterError):
            self.sd.date(100, 0)
dataset/ETHPy150Open kaleidos/django-sampledatahelper/tests/tests.py/TestTimeHelpers.test_date/swapped operands of `<=`