Skip to content

Commit c00e9df

Browse files
authored
Merge pull request #1379 from haddocking/fix-alascan-test
Remove tmp dir in alascan uni-test
2 parents ec62b68 + b4f4d5a commit c00e9df

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22

3+
- 2025-09-09: Removes undesired directory created when running the uni-tests - Issue #1380
34
- 2025-09-09: Added notebooks with tutorials - Issue #1367
45
- 2025-09-05: Consistancy in cluster naming in contactmap module - Issue #1359
56
- 2025-09-03: Added support for THR-glycosylation - Issue #1371

tests/test_module_alascan.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -742,21 +742,23 @@ def test_model_point_mutation_run_with_output_mutants_true(mocker, monkeypatch):
742742
assert result.success is True
743743

744744

745-
def test_model_point_mutation_fail():
745+
def test_model_point_mutation_fail(monkeypatch):
746746
"""Test ModelPointMutation with non-existent model file."""
747-
job = ModelPointMutation(
748-
model_path=Path("non-pdb-here.pdb"),
749-
model_id="test",
750-
chain="A",
751-
resid=1,
752-
ori_resname="ALA",
753-
target_resname="TRP",
754-
native_scores=(0, 0, 0, 0, 0),
755-
output_mutants=False
756-
)
757-
result = job.run()
758-
# Should return failed result
759-
assert result.success is False
747+
with tempfile.TemporaryDirectory() as tmpdir:
748+
monkeypatch.chdir(tmpdir)
749+
job = ModelPointMutation(
750+
model_path=Path("non-pdb-here.pdb"),
751+
model_id="test",
752+
chain="A",
753+
resid=1,
754+
ori_resname="ALA",
755+
target_resname="TRP",
756+
native_scores=(0, 0, 0, 0, 0),
757+
output_mutants=False
758+
)
759+
result = job.run()
760+
# Should return failed result
761+
assert result.success is False
760762

761763

762764
def test_model_point_mutation_cleanup(mocker, mutation_job, monkeypatch):

0 commit comments

Comments
 (0)