Skip to content

Commit

Permalink
attempt gzipping test files
Browse files Browse the repository at this point in the history
  • Loading branch information
esoteric-ephemera committed May 22, 2024
1 parent bf79258 commit 6aaecf4
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 19,993 deletions.
4,399 changes: 0 additions & 4,399 deletions tests/files/io/OUTCAR

This file was deleted.

Binary file added tests/files/io/OUTCAR.gz
Binary file not shown.
6,839 changes: 0 additions & 6,839 deletions tests/files/io/vasprun.xml

This file was deleted.

Binary file added tests/files/io/vasprun.xml.gz
Binary file not shown.
4,348 changes: 0 additions & 4,348 deletions tests/files/large_sigma/OUTCAR_fail_sigma_check

This file was deleted.

Binary file not shown.
4,399 changes: 0 additions & 4,399 deletions tests/files/large_sigma/OUTCAR_pass_sigma_check

This file was deleted.

Binary file not shown.
8 changes: 4 additions & 4 deletions tests/vasp/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,22 +817,22 @@ def setUp(self) -> None:
for f in (
"INCAR",
"POSCAR",
"OUTCAR_fail_sigma_check",
"OUTCAR_pass_sigma_check",
"OUTCAR_fail_sigma_check.gz",
"OUTCAR_pass_sigma_check.gz",
)
],
)

def test_check_correct_large_sigma(self) -> None:
# first check should reduce sigma
handler = LargeSigmaHandler(output_filename="OUTCAR_fail_sigma_check")
handler = LargeSigmaHandler(output_filename="OUTCAR_fail_sigma_check.gz")
assert handler.check()
dct = handler.correct()
assert dct["errors"] == ["LargeSigma"]
assert Incar.from_file("INCAR")["SIGMA"] == pytest.approx(0.1115, rel=1.0e-3)

# second check should find that sigma is correct as-is
handler = LargeSigmaHandler(output_filename="OUTCAR_pass_sigma_check")
handler = LargeSigmaHandler(output_filename="OUTCAR_pass_sigma_check.gz")
assert not handler.check()


Expand Down
8 changes: 4 additions & 4 deletions tests/vasp/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ def _clear_tracked_cache() -> None:

class TestIO:
def test_load_outcar(self) -> None:
outcar = load_outcar(f"{TEST_FILES}/io/OUTCAR")
outcar = load_outcar(f"{TEST_FILES}/io/OUTCAR.gz")
assert outcar is not None
outcar2 = load_outcar(f"{TEST_FILES}/io/OUTCAR")
outcar2 = load_outcar(f"{TEST_FILES}/io/OUTCAR.gz")

assert outcar is outcar2

assert len(tracked_lru_cache.cached_functions) == 1

def test_load_vasprun(self) -> None:
vr = load_vasprun(f"{TEST_FILES}/io/vasprun.xml")
vr = load_vasprun(f"{TEST_FILES}/io/vasprun.xml.gz")
assert vr is not None
vr2 = load_vasprun(f"{TEST_FILES}/io/vasprun.xml")
vr2 = load_vasprun(f"{TEST_FILES}/io/vasprun.xml.gz")

assert vr is vr2

Expand Down

0 comments on commit 6aaecf4

Please sign in to comment.