File tree 1 file changed +4
-0
lines changed 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -3416,10 +3416,12 @@ def test_file_modified_after_execution(self):
3416
3416
print("hello")
3417
3417
"""
3418
3418
3419
+ # the time.sleep is needed for low-resolution filesystems like HFS+
3419
3420
commands = """
3420
3421
filename = $_frame.f_code.co_filename
3421
3422
f = open(filename, "w")
3422
3423
f.write("print('goodbye')")
3424
+ import time; time.sleep(1)
3423
3425
f.close()
3424
3426
ll
3425
3427
"""
@@ -3429,10 +3431,12 @@ def test_file_modified_after_execution(self):
3429
3431
self .assertIn ("was edited" , stdout )
3430
3432
3431
3433
def test_file_modified_after_execution_with_multiple_instances (self ):
3434
+ # the time.sleep is needed for low-resolution filesystems like HFS+
3432
3435
script = """
3433
3436
import pdb; pdb.Pdb().set_trace()
3434
3437
with open(__file__, "w") as f:
3435
3438
f.write("print('goodbye')\\ n" * 5)
3439
+ import time; time.sleep(1)
3436
3440
import pdb; pdb.Pdb().set_trace()
3437
3441
"""
3438
3442
You can’t perform that action at this time.
0 commit comments