Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ test = [
"parameterized==0.9",
"pytest>=7",
"pytest-cov>=6.2.1",
"pytest-xdist>=3",
"types-beautifulsoup4==4.12.0.20250516",
"types-requests==2.33.0.20260518",
"types-tqdm==4.68.0.20260608",
Expand All @@ -85,7 +86,7 @@ envs.hatch-test.overrides.matrix.python.features = [
]
# pyproject.toml is the single source of truth for the environments CI tests:
# the workflow reads this matrix via `hatch env show --json`.
envs.hatch-test.default-args = [ "tests" ]
envs.hatch-test.default-args = [ "-n", "auto", "tests" ]
envs.hatch-test.dependency-groups = [ "test" ]

[tool.ruff]
Expand Down
19 changes: 3 additions & 16 deletions tests/test_virus.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,24 +261,11 @@ class TestVirus(unittest.TestCase, metaclass=from_json(virus_dict, virus)):
See module docstring for detailed parameter coverage analysis.
"""

@classmethod
def setUpClass(cls):
"""Set up test fixtures that are shared across all tests."""
cls.test_output_dir = "test_virus_output"

@classmethod
def tearDownClass(cls):
"""Clean up after all tests have run."""
# Clean up test output directory if it exists
if os.path.exists(cls.test_output_dir):
shutil.rmtree(cls.test_output_dir)

def setUp(self):
"""Set up before each test method."""
# Create a fresh test output directory
if os.path.exists(self.test_output_dir):
shutil.rmtree(self.test_output_dir)
os.makedirs(self.test_output_dir, exist_ok=True)
# Create a unique per-test output directory so tests can run in parallel
# (pytest-xdist) without racing on a shared, fixed directory.
self.test_output_dir = tempfile.mkdtemp(prefix="test_virus_")

def tearDown(self):
"""Clean up after each test method."""
Expand Down
Loading