From 58ab97e7fee9f1ceda50811fff1305c25978e646 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Tue, 4 Jun 2024 15:41:50 -0400 Subject: [PATCH] replace get_gzip_or_unzipped with monty.os.path.zpath --- tests/vasp/test_io.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/vasp/test_io.py b/tests/vasp/test_io.py index 636cb21f..04160a4e 100644 --- a/tests/vasp/test_io.py +++ b/tests/vasp/test_io.py @@ -1,8 +1,9 @@ import pytest +from monty.os.path import zpath from custodian.utils import tracked_lru_cache from custodian.vasp.io import load_outcar, load_vasprun -from tests.conftest import TEST_FILES, get_gzip_or_unzipped +from tests.conftest import TEST_FILES @pytest.fixture(autouse=True) @@ -15,7 +16,7 @@ def _clear_tracked_cache() -> None: class TestIO: def test_load_outcar(self) -> None: - outcar_file = get_gzip_or_unzipped(f"{TEST_FILES}/io/OUTCAR.gz") + outcar_file = zpath(f"{TEST_FILES}/io/OUTCAR") outcar = load_outcar(outcar_file) assert outcar is not None outcar2 = load_outcar(outcar_file) @@ -25,7 +26,7 @@ def test_load_outcar(self) -> None: assert len(tracked_lru_cache.cached_functions) == 1 def test_load_vasprun(self) -> None: - vasprun_file = get_gzip_or_unzipped(f"{TEST_FILES}/io/vasprun.xml.gz") + vasprun_file = zpath(f"{TEST_FILES}/io/vasprun.xml") vr = load_vasprun(vasprun_file) assert vr is not None vr2 = load_vasprun(vasprun_file)