Exemple #1
0
def test_bad_init_from_normal(bad_normal, bad_d):
    with pytest.raises(TypeError):
        Plane.from_normal(bad_normal, bad_d)
Exemple #2
0
def test_init_from_normal(expected_normal, expected_d):
    v = Plane.from_normal(expected_normal, expected_d)
    assert v.normal == expected_normal, msg_tmpl % (v.normal, expected_normal)
    assert v.d == expected_d, msg_tmpl % (v.d, expected_d)