Exemple #1
0
def test_bond():
    b = Bond(0, 1)
    assert b.get_bond_order() == 1

    b1 = Bond(1, 0)
    assert b == b1

    assert b.get_nbr_atom_idx(1) == 0
Exemple #2
0
def test_type_checking():
    b = Bond(2, 0)
    with pytest.raises(TypeError):
        value_long = float(
            2)  # do not test long because it obsolete in python3
        b.get_nbr_atom_idx(value_long)