Beispiel #1
0
 def test_set_structure_phase_name(self):
     name = "al"
     p = Phase(name=name)
     p.structure = Structure(lattice=Lattice(*([0.405] * 3 + [90] * 3)))
     assert p.name == name
     assert p.structure.title == name
Beispiel #2
0
 def test_set_structure_raises(self):
     p = Phase()
     with pytest.raises(ValueError, match=".* must be a diffpy.structure.Structure"):
         p.structure = [1, 2, 3, 90, 90, 90]
Beispiel #3
0
    def test_set_structure(self, structure):
        p = Phase()
        p.structure = structure

        assert p.structure == structure