Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
esoteric-ephemera committed May 9, 2024
1 parent b0a9e64 commit c72e686
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/vasp/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,22 +809,29 @@ def test_check_with_non_kspacing_wf(self) -> None:


class LargeSigmaHandlerTest(PymatgenTest):

def setUp(self) -> None:
copy_tmp_files(
self.tmp_path, *[f"large_sigma/{f}" for f in ("INCAR","vasprun.xml.1", "vasprun.xml.2",)]
self.tmp_path,
*[
f"large_sigma/{f}"
for f in (
"INCAR",
"vasprun.xml.1",
"vasprun.xml.2",
)
],
)

def test_check_correct_large_sigma(self) -> None:
# first check should reduce sigma
handler = LargeSigmaHandler(output_vasprun = "vasprun.xml.1")
handler = LargeSigmaHandler(output_vasprun="vasprun.xml.1")
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 appropriately reduced
handler = LargeSigmaHandler(output_vasprun = "vasprun.xml.2")
handler = LargeSigmaHandler(output_vasprun="vasprun.xml.2")
assert not handler.check()


Expand Down

0 comments on commit c72e686

Please sign in to comment.