File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2744,7 +2744,7 @@ def test_toy_build_lock(self):
27442744 self .test_toy_build (extra_args = extra_args + ['--ignore-locks' ], verify = True , raise_error = True )
27452745
27462746 # define a context manager that remove a lock after a while, so we can check the use of --wait-for-lock
2747- class remove_lock_after :
2747+ class remove_lock_after ( object ) :
27482748 def __init__ (self , seconds , lock_fp ):
27492749 self .seconds = seconds
27502750 self .lock_fp = lock_fp
@@ -2757,7 +2757,8 @@ def __enter__(self):
27572757 signal .alarm (self .seconds )
27582758
27592759 def __exit__ (self , type , value , traceback ):
2760- pass
2760+ # cancel scheduled alarm (just for cleanup sake)
2761+ signal .alarm (0 )
27612762
27622763 # wait for lock to be removed, with 1 second interval of checking;
27632764 # check with both --wait-on-lock-interval and deprecated --wait-on-lock options
@@ -2854,7 +2855,7 @@ def test_toy_lock_cleanup_signals(self):
28542855 self .assertFalse (os .path .exists (locks_dir ))
28552856
28562857 # context manager which stops the function being called with the specified signal
2857- class wait_and_signal :
2858+ class wait_and_signal ( object ) :
28582859 def __init__ (self , seconds , signum ):
28592860 self .seconds = seconds
28602861 self .signum = signum
You can’t perform that action at this time.
0 commit comments