1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
import pytest
from emmet.core.robocrys import RobocrystallogapherDoc
from pymatgen.core import Structure
from . import test_structures
@pytest.mark.skip(reason="Skip until matminer is released")
@pytest.mark.parametrize("structure", test_structures.values())
def test_robocrys(structure: Structure):
"""Very simple test to make sure this actually works"""
try:
print(f"Should work : {structure.composition}")
doc = RobocrystallogapherDoc.from_structure(
structure=structure, material_id=33, deprecated=False
)
assert doc is not None
except (ModuleNotFoundError,ImportError):
pytest.xfail("requires robocrys")
|