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 @@ -3517,10 +3517,12 @@ def test_file_modified_after_execution(self):
3517
3517
print("hello")
3518
3518
"""
3519
3519
3520
+ # the time.sleep is needed for low-resolution filesystems like HFS+
3520
3521
commands = """
3521
3522
filename = $_frame.f_code.co_filename
3522
3523
f = open(filename, "w")
3523
3524
f.write("print('goodbye')")
3525
+ import time; time.sleep(1)
3524
3526
f.close()
3525
3527
ll
3526
3528
"""
@@ -3530,10 +3532,12 @@ def test_file_modified_after_execution(self):
3530
3532
self .assertIn ("was edited" , stdout )
3531
3533
3532
3534
def test_file_modified_after_execution_with_multiple_instances (self ):
3535
+ # the time.sleep is needed for low-resolution filesystems like HFS+
3533
3536
script = """
3534
3537
import pdb; pdb.Pdb().set_trace()
3535
3538
with open(__file__, "w") as f:
3536
3539
f.write("print('goodbye')\\ n" * 5)
3540
+ import time; time.sleep(1)
3537
3541
import pdb; pdb.Pdb().set_trace()
3538
3542
"""
3539
3543
You can’t perform that action at this time.
0 commit comments