File: test_no_moyopy.patch

package info (click to toggle)
pymatgen 2025.10.7%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 83,468 kB
  • sloc: python: 175,932; javascript: 780; makefile: 221; sh: 59
file content (20 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: pymatgen/tests/analysis/test_prototypes.py
===================================================================
--- pymatgen.orig/tests/analysis/test_prototypes.py	2025-10-12 13:20:36.373409788 +0200
+++ pymatgen/tests/analysis/test_prototypes.py	2025-10-12 15:16:06.443788406 +0200
@@ -352,6 +352,7 @@
 @pytest.mark.parametrize(("structure", "expected"), zip(TEST_STRUCTS, TEST_PROTOSTRUCTURES, strict=False))
 def test_get_protostructure_label_from_moyopy(structure, expected):
     """Check that moyopy gives correct protostructure label simple cases."""
+    pytest.importorskip("moyopy")
     assert get_protostructure_label_from_moyopy(structure) == expected, (
         f"unexpected moyopy protostructure for {structure=}"
     )
@@ -365,6 +366,7 @@
 )
 def test_moyopy_spglib_consistency(protostructure):
     """Check that moyopy and spglib give consistent results."""
+    pytest.importorskip("moyopy")
     struct = get_random_structure_for_protostructure(protostructure)
 
     moyopy_label = get_protostructure_label_from_moyopy(struct)