diff --git a/test/test_threads.py b/test/test_threads.py index 45a4d92..df1a786 100644 --- a/test/test_threads.py +++ b/test/test_threads.py @@ -72,10 +72,6 @@ def assert_callbacks_called(self): class InvalidBinaryThreadedAustin(ThreadedAustin): BINARY = "_austin" - @check_raises(AustinError) - def run(self, *args, **kwargs): - super().run(*args, **kwargs) - def test_threaded(): austin = TestThreadedAustin() @@ -109,8 +105,10 @@ def terminate_callback(*args): def test_threaded_invalid_binary(): - SimpleAustin.start = check_raises(AustinError)(SimpleAustin.start) - InvalidBinaryThreadedAustin(sample_callback=lambda x: None).start(["python"]) + austin = InvalidBinaryThreadedAustin(sample_callback=lambda x: None) + austin.start(["python"]) + with raises(AustinError): + austin.join() def test_threaded_no_sample_callback(): @@ -121,4 +119,5 @@ def test_threaded_no_sample_callback(): def test_threaded_bad_options(): austin = TestThreadedAustin(terminate_callback=lambda *args: None) austin.start(["-I", "1000", "python", "-c", "for i in range(1000000): print(i)"]) - austin.join() + with raises(AustinError): + austin.join()