Ejemplo n.º 1
0
def test_defect_msonable():
    defect = Defect("Va_O1", (1, 2))
    assert_msonable(defect)
Ejemplo n.º 2
0
def test_defect_name_and_charges():
    defect = Defect("Va_O1", (1, 2))
    assert defect.str_list == ["Va_O1_1", "Va_O1_2"]
Ejemplo n.º 3
0
def test_simple_defect():
    defect = SimpleDefect(None, "O1", [1, 2])
    expected = Defect("Va_O1", (1, 2))
    assert defect.name == expected.name
    assert defect.charge_list == expected.charge_list
    assert defect.in_atom is None
Ejemplo n.º 4
0
def test_defect_hashable():
    defect = Defect("Va_O1", (1, 2))
    d = {defect: 1}