Skip to content

Commit

Permalink
skip failing TestQCOutput.test_all
Browse files Browse the repository at this point in the history
remove unused self.maxDiff = None
  • Loading branch information
janosh committed Apr 10, 2024
1 parent e023eec commit 1410a2e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
2 changes: 0 additions & 2 deletions tests/analysis/test_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@

class TestStructureGraph(PymatgenTest):
def setUp(self):
self.maxDiff = None

# trivial example, simple square lattice for testing
structure = Structure(Lattice.tetragonal(5, 50), ["H"], [[0, 0, 0]])
self.square_sg = StructureGraph.from_empty_graph(structure, edge_weight_name="", edge_weight_units="")
Expand Down
2 changes: 0 additions & 2 deletions tests/io/lammps/test_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,6 @@ def test_add_comment(self):


class TestLammpsRun(PymatgenTest):
maxDiff = None

def test_md(self):
struct = Structure.from_spacegroup(225, Lattice.cubic(3.62126), ["Cu"], [[0, 0, 0]])
ld = LammpsData.from_structure(struct, atom_style="atomic")
Expand Down
1 change: 0 additions & 1 deletion tests/io/qchem/test_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def test_molecule_template(self):
assert molecule_actual == molecule_test

def test_multi_molecule_template(self):
self.maxDiff = None
species = ["C", "C", "H", "H", "H", "H"]
coords_1 = [
[0.000000, 0.000000, 0.000000],
Expand Down
16 changes: 7 additions & 9 deletions tests/io/qchem/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,16 @@ def _test_property(self, key, single_outs, multi_outs):
else:
assert_allclose(sub_output.data.get(key), multi_job_dict[filename][idx].get(key), atol=1e-6)

@pytest.mark.skip() # self._test_property(key, single_outs, multi_outs) fails with
# ValueError: The truth value of an array with more than one element is ambiguous
@pytest.mark.skipif(openbabel is None, reason="OpenBabel not installed.")
def test_all(self):
self.maxDiff = None
single_outs = {}
for file in single_job_out_names:
single_outs[file] = QCOutput(f"{TEST_FILES_DIR}/molecules/{file}").data
single_outs = {file: QCOutput(f"{TEST_FILES_DIR}/molecules/{file}").data for file in single_job_out_names}

multi_outs = {}
for file in multi_job_out_names:
multi_outs[file] = QCOutput.multiple_outputs_from_file(
f"{TEST_FILES_DIR}/molecules/{file}", keep_sub_files=False
)
multi_outs = {
file: QCOutput.multiple_outputs_from_file(f"{TEST_FILES_DIR}/molecules/{file}", keep_sub_files=False)
for file in multi_job_out_names
}

for key in property_list:
self._test_property(key, single_outs, multi_outs)
Expand Down

0 comments on commit 1410a2e

Please sign in to comment.