Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some date related tests are failing #9

Open
calmrat opened this issue Aug 16, 2013 · 2 comments
Open

some date related tests are failing #9

calmrat opened this issue Aug 16, 2013 · 2 comments

Comments

@calmrat
Copy link
Contributor

calmrat commented Aug 16, 2013

cward@cward pql [master] $ python -m unittest find_tests

...........F.F...................

FAIL: test_date (find_tests.PqlSchemaLessTestCase)

Traceback (most recent call last):
File "find_tests.py", line 92, in test_date
self.compare('a == date(10)', {'a': datetime(1969, 12, 31, 19, 0, 10)})
File "find_tests.py", line 10, in compare
self.assertEqual(pql.find(string), expected)
AssertionError: {'a': datetime.datetime(1970, 1, 1, 1, 0, 10)} != {'a': datetime.datetime(1969, 12, 31, 19, 0, 10)}

  • {'a': datetime.datetime(1970, 1, 1, 1, 0, 10)}
  • {'a': datetime.datetime(1969, 12, 31, 19, 0, 10)}

FAIL: test_epoch (find_tests.PqlSchemaLessTestCase)

Traceback (most recent call last):
File "find_tests.py", line 99, in test_epoch
self.compare('a == epoch("2012")', {'a': 1340164800})
File "find_tests.py", line 10, in compare
self.assertEqual(pql.find(string), expected)
AssertionError: {'a': 1345068000.0} != {'a': 1340164800}

  • {'a': 1345068000.0}
    ? - ---
  • {'a': 1340164800}
    ? + +

Ran 33 tests in 0.007s

FAILED (failures=2)

@calmrat
Copy link
Contributor Author

calmrat commented Aug 16, 2013

i suppose this is because of datetime localization; my local system, where i'm running the tests, is in CEST; or UTC+1

@alonho
Copy link
Owner

alonho commented Aug 25, 2013

It even fails for me since, probably because daylight savings and such. I'll fix it soon. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants