diff options
author | Łukasz Langa <lukasz@langa.pl> | 2024-07-22 11:03:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-22 11:03:07 (GMT) |
commit | cad11a2bdceb6d4683ae5654ce555cdf5f191217 (patch) | |
tree | f3ced822f2a33268de86a903bede99d9c4f5ca1b | |
parent | bc264eac3ad14dab748e33b3d714c2674872791f (diff) | |
download | cpython-cad11a2bdceb6d4683ae5654ce555cdf5f191217.zip cpython-cad11a2bdceb6d4683ae5654ce555cdf5f191217.tar.gz cpython-cad11a2bdceb6d4683ae5654ce555cdf5f191217.tar.bz2 |
gh-111051: [tests] Wait a second to support filesystems with low-resolution mtime (GH-121959)
-rw-r--r-- | Lib/test/test_pdb.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index f71856d..9395e9b 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -3517,10 +3517,12 @@ def bœr(): print("hello") """ + # the time.sleep is needed for low-resolution filesystems like HFS+ commands = """ filename = $_frame.f_code.co_filename f = open(filename, "w") f.write("print('goodbye')") + import time; time.sleep(1) f.close() ll """ @@ -3530,10 +3532,12 @@ def bœr(): self.assertIn("was edited", stdout) def test_file_modified_after_execution_with_multiple_instances(self): + # the time.sleep is needed for low-resolution filesystems like HFS+ script = """ import pdb; pdb.Pdb().set_trace() with open(__file__, "w") as f: f.write("print('goodbye')\\n" * 5) + import time; time.sleep(1) import pdb; pdb.Pdb().set_trace() """ |