Skip to content

Commit b27739b

Browse files
Fix all Pylint errors in test files
Co-authored-by: willtheorangeguy <[email protected]>
1 parent 73565e3 commit b27739b

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

tests/test___main__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import sys
66
import os
7-
from unittest.mock import patch, MagicMock
8-
import subprocess
7+
import importlib.util
98

109
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
1110

@@ -27,8 +26,6 @@ def test_main_entry_point_structure():
2726
def test_main_module_can_be_imported():
2827
"""Test that __main__.py can be imported without errors."""
2928
# Import the module using importlib
30-
import importlib.util
31-
3229
main_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "__main__.py")
3330
spec = importlib.util.spec_from_file_location("__main_test__", main_path)
3431
module = importlib.util.module_from_spec(spec)
@@ -38,7 +35,7 @@ def test_main_module_can_be_imported():
3835
assert spec is not None
3936

4037

41-
def test_main_execution_via_python_m(capfd):
38+
def test_main_execution_via_python_m():
4239
"""Test running the module via python -m."""
4340
# This test would require subprocess which might not work in all environments
4441
# So we'll verify the structure instead

tests/test_main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""Test main.py."""
22

33
# pylint: disable=import-error, wrong-import-position, unused-argument, redefined-builtin
4+
# pylint: disable=import-outside-toplevel
45

56
import unittest
6-
from unittest.mock import patch, MagicMock
7+
from unittest.mock import patch
78
import sys
89
import os
910

tests/test_print.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Test print.py."""
22

3-
# pylint: disable=import-error, wrong-import-position
3+
# pylint: disable=import-error, wrong-import-position, import-outside-toplevel
44

55
import sys
66
import os
7-
from unittest.mock import patch
87

98
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
109

0 commit comments

Comments
 (0)