File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1093,13 +1093,14 @@ def test_uuid7_overflow_counter(self):
10931093
10941094 # Check that the timestamp of future UUIDs created within
10951095 # the same logical millisecond does not advance after the
1096- # counter overflowed. In addition, since the counter could
1097- # be incremented, we are no more in an "overflow" state.
1096+ # counter overflowed. In addition, even if the counter could
1097+ # be incremented, we are still in an "overflow" state as the
1098+ # timestamp should not be modified unless we re-overflow.
10981099 #
10991100 # See https://github.com/python/cpython/issues/138862.
11001101 v = self .uuid .uuid7 ()
11011102 equal (v .time , unix_ts_ms )
1102- self .assertFalse (self .uuid ._last_counter_v7_overflow )
1103+ self .assertTrue (self .uuid ._last_counter_v7_overflow )
11031104
11041105 def test_uuid8 (self ):
11051106 equal = self .assertEqual
Original file line number Diff line number Diff line change @@ -900,7 +900,6 @@ def uuid7():
900900 timestamp_ms += 1
901901 counter , tail = _uuid7_get_counter_and_tail ()
902902 else :
903- _last_counter_v7_overflow = False
904903 # 32-bit random data
905904 tail = int .from_bytes (os .urandom (4 ))
906905
You can’t perform that action at this time.
0 commit comments