File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -763,13 +763,13 @@ def test_create_tmp(self, repetitions=10):
763763 self .assertIsNot (match , None , "Invalid file name: '%s'" % tail )
764764 groups = match .groups ()
765765 if previous_groups is not None :
766- self .assertTrue (int (groups [0 ] >= previous_groups [0 ]),
766+ self .assertGreaterEqual (int (groups [0 ]), int ( previous_groups [0 ]),
767767 "Non-monotonic seconds: '%s' before '%s'" %
768768 (previous_groups [0 ], groups [0 ]))
769- self . assertTrue ( int (groups [1 ] >= previous_groups [1 ]) or
770- groups [0 ] != groups [1 ],
771- "Non-monotonic milliseconds: '%s' before '%s'" %
772- (previous_groups [1 ], groups [1 ]))
769+ if int (groups [0 ]) == int ( previous_groups [0 ]):
770+ self . assertGreaterEqual ( int ( groups [1 ]), int ( previous_groups [1 ]) ,
771+ "Non-monotonic milliseconds: '%s' before '%s'" %
772+ (previous_groups [1 ], groups [1 ]))
773773 self .assertEqual (int (groups [2 ]), pid ,
774774 "Process ID mismatch: '%s' should be '%s'" %
775775 (groups [2 ], pid ))
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ Extension Modules
2828Tests
2929-----
3030
31+ - Issue #15802: Fix test logic in TestMaildir.test_create_tmp. Patch
32+ by Serhiy Storchaka.
33+
3134Build
3235-----
3336
You can’t perform that action at this time.
0 commit comments