Skip to content

Commit

Permalink
fix TestCritic2Analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Mar 27, 2024
1 parent f1917df commit 516a98b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tests/command_line/test_critic2_caller.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from shutil import which
from unittest import TestCase

import pytest
from pytest import approx
Expand Down Expand Up @@ -73,7 +74,7 @@ def test_from_structure(self):
assert "ERROR : load int.CHGCAR id chg_int zpsp Mo 6 S 6" in c2c._input_script


class TestCritic2Analysis:
class TestCritic2Analysis(TestCase):
def setUp(self):
stdout_file = f"{TEST_FILES_DIR}/critic2/MoS2_critic2_stdout.txt"
stdout_file_new_format = f"{TEST_FILES_DIR}/critic2/MoS2_critic2_stdout_new_format.txt"
Expand All @@ -87,7 +88,7 @@ def setUp(self):
self.c2o = Critic2Analysis(structure, reference_stdout)
self.c2o_new_format = Critic2Analysis(structure, reference_stdout_new_format)

def test_properties_to_from_dict(self):
def test_to_from_dict(self):
assert len(self.c2o.critical_points) == 6
assert len(self.c2o.nodes) == 14
assert len(self.c2o.edges) == 10
Expand Down
2 changes: 1 addition & 1 deletion tests/files/.pytest-split-durations
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@
"tests/command_line/test_chargemol_caller.py::TestChargemolAnalysis::test_parse_chargemol": 0.05377787502948195,
"tests/command_line/test_chargemol_caller.py::TestChargemolAnalysis::test_parse_chargemol2": 0.0007731670048087835,
"tests/command_line/test_critic2_caller.py::TestCritic2Analysis::test_graph_output": 0.002192000043578446,
"tests/command_line/test_critic2_caller.py::TestCritic2Analysis::test_properties_to_from_dict": 0.0017835840117186308,
"tests/command_line/test_critic2_caller.py::TestCritic2Analysis::test_to_from_dict": 0.0017835840117186308,
"tests/command_line/test_critic2_caller.py::TestCritic2Caller::test_from_path": 0.00018416601233184338,
"tests/command_line/test_critic2_caller.py::TestCritic2Caller::test_from_structure": 0.00014708400703966618,
"tests/command_line/test_enumlib_caller.py::TestEnumlibAdaptor::test_init": 0.0001795410644263029,
Expand Down

0 comments on commit 516a98b

Please sign in to comment.