diff --git a/tests/test_utils_shortcut.py b/tests/test_utils_shortcut.py index 6f2b6dc82..8223d78b9 100644 --- a/tests/test_utils_shortcut.py +++ b/tests/test_utils_shortcut.py @@ -23,7 +23,7 @@ class TestShortcutInitialization: assert sc.name == "addition fct" assert sc.func(2, 3) == 5 -def test_run_method(self, capsys): +def test_run_method(capsys): # Test direct execution while verifying print output execution_results = [] @@ -49,7 +49,7 @@ def test_run_method(self, capsys): task = sc.run(hold=True) assert task.hold is True -def test_repr_output(self): +def test_repr_output(): # Test exact __repr__ format def my_func(): pass @@ -57,7 +57,7 @@ def test_repr_output(self): sc = Shortcut(my_func, name="Test Repr") assert repr(sc) == f"Shortcut \"Test Repr\"" -def test_source_with_regular_function(self): +def test_source_with_regular_function(): # Test source with normal function def example(): a = 1 @@ -72,7 +72,7 @@ def test_source_with_regular_function(self): assert "return a + b" in src @patch('inspect.getsource') -def test_source_error_handling(self, mock_getsource): +def test_source_error_handling(mock_getsource): # Test exception handling when inspect fails mock_getsource.side_effect = OSError("No source") sc = Shortcut(lambda x: x)