Пример #1
0
def test_defect_msonable():
    defect = Defect("Va_O1", (1, 2))
    assert_msonable(defect)
Пример #2
0
def test_defect_name_and_charges():
    defect = Defect("Va_O1", (1, 2))
    assert defect.str_list == ["Va_O1_1", "Va_O1_2"]
Пример #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
Пример #4
0
def test_defect_hashable():
    defect = Defect("Va_O1", (1, 2))
    d = {defect: 1}