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

deephaven2 unit test failure in nightlies #1910

Closed
rcaudy opened this issue Feb 1, 2022 · 2 comments
Closed

deephaven2 unit test failure in nightlies #1910

rcaudy opened this issue Feb 1, 2022 · 2 comments
Assignees
Labels
bug Something isn't working python python-server-side
Milestone

Comments

@rcaudy
Copy link
Member

rcaudy commented Feb 1, 2022

  ======================================================================
  FAIL [0.004s]: test_datetime_at_midnight (test_time.DateT
  imeUtilsTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/python/tests/test_time.py", line 68, in test_datetime_at_midnight
      self.assertGreaterEqual(diff_nanos(mid_night_time_ny, mid_night_time_pt), 0)
  AssertionError: -75600000000000 not greater than or equal to 0
@rcaudy rcaudy added bug Something isn't working python python-server-side labels Feb 1, 2022
@rcaudy rcaudy added this to the Feb 2022 milestone Feb 1, 2022
@rcaudy
Copy link
Member Author

rcaudy commented Feb 1, 2022

-75600000000000 nanos is -21 hours
It looks like this ran after midnight ET and before midnight PT.

Test code:

    def test_datetime_at_midnight(self):
        dt = now()
        mid_night_time_ny = datetime_at_midnight(dt, TimeZone.NY)
        mid_night_time_pt = datetime_at_midnight(dt, TimeZone.PT)
        self.assertGreaterEqual(diff_nanos(mid_night_time_ny, mid_night_time_pt), 0)

This isn't a very good test, in general; we can be more specific in our expectations.
I think it makes more sense to have a set of input datetimes, and expected midnight datetimes in multiple timezones, including on dates with to/from DST transitions.

@jmao-denver
Copy link
Contributor

fixed by #1812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python python-server-side
Projects
None yet
Development

No branches or pull requests

2 participants