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

TimeUtilTest.test_uuid_from_time time to time fails on windows-latest #369

Open
dkropachev opened this issue Aug 15, 2024 · 0 comments
Open

Comments

@dkropachev
Copy link
Collaborator

Happened here

  ================================== FAILURES ===================================
  ______________________ TimeUtilTest.test_uuid_from_time _______________________
  
  self = <tests.unit.test_time_util.TimeUtilTest testMethod=test_uuid_from_time>
  
      def test_uuid_from_time(self):
          t = time.time()
          seq = 0x2aa5
          node = uuid.getnode()
          u = util.uuid_from_time(t, node, seq)
          # using AlmostEqual because time precision is different for
          # some platforms
          self.assertAlmostEqual(util.unix_time_from_uuid1(u), t, 4)
          self.assertEqual(u.node, node)
          self.assertEqual(u.clock_seq, seq)
      
          # random node
          u1 = util.uuid_from_time(t, clock_seq=seq)
          u2 = util.uuid_from_time(t, clock_seq=seq)
          self.assertAlmostEqual(util.unix_time_from_uuid1(u1), t, 4)
          self.assertAlmostEqual(util.unix_time_from_uuid1(u2), t, 4)
          self.assertEqual(u.clock_seq, seq)
          # not impossible, but we shouldn't get the same value twice
          self.assertNotEqual(u1.node, u2.node)
      
          # random seq
          u1 = util.uuid_from_time(t, node=node)
          u2 = util.uuid_from_time(t, node=node)
          self.assertAlmostEqual(util.unix_time_from_uuid1(u1), t, 4)
          self.assertAlmostEqual(util.unix_time_from_uuid1(u2), t, 4)
          self.assertEqual(u.node, node)
          # not impossible, but we shouldn't get the same value twice
  >       self.assertNotEqual(u1.clock_seq, u2.clock_seq)
  E       AssertionError: 5422 == 5422
  
  D:\a\python-driver\python-driver\tests\unit\test_time_util.py:77: AssertionError
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

1 participant