MCPcopy Create free account
hub / github.com/SINGROUP/dscribe / assert_matrix_descriptor_exceptions

Function assert_matrix_descriptor_exceptions

tests/conftest.py:641–653  ·  view source on GitHub ↗
(descriptor_func)

Source from the content-addressed store, hash-verified

639
640
641def assert_matrix_descriptor_exceptions(descriptor_func):
642 system = get_simple_finite()
643
644 # Unknown permutation option
645 with pytest.raises(ValueError):
646 descriptor_func(n_atoms_max=5, permutation="unknown")()
647 # Negative n_atom_max
648 with pytest.raises(ValueError):
649 descriptor_func(n_atoms_max=-1)()
650 # System has more atoms than the specified maximum
651 with pytest.raises(ValueError):
652 cm = descriptor_func(n_atoms_max=2)()
653 cm.create([system])
654
655
656def assert_matrix_descriptor_sorted(descriptor_func):

Calls 2

get_simple_finiteFunction · 0.85
createMethod · 0.45

Tested by

no test coverage detected