https://github.com/python/cpython/commit/cad11a2bdceb6d4683ae5654ce555cdf5f191217
commit: cad11a2bdceb6d4683ae5654ce555cdf5f191217
branch: main
author: Ćukasz Langa <[email protected]>
committer: ambv <[email protected]>
date: 2024-07-22T13:03:07+02:00
summary:
gh-111051: [tests] Wait a second to support filesystems with low-resolution
mtime (GH-121959)
files:
M Lib/test/test_pdb.py
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
index f71856d3603d73..9395e9b133f50d 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -3517,10 +3517,12 @@ def test_file_modified_after_execution(self):
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 test_file_modified_after_execution(self):
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()
"""
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]