Ejemplo n.º 1
0
def test_se2_se2g_randomgen_translation_restricted_interval():
    a = 2.3
    b = 2.5
    interval = (a, b)
    given_output = se2.se2g_randomgen_translation(interval)
    assert a <= given_output.norm('translation') <= b
Ejemplo n.º 2
0
def test_se2_se2g_randomgen_translation_bigger_interval():
    a = 0
    b = 15
    interval = (a, b)
    given_output = se2.se2g_randomgen_translation(interval)
    assert a <= given_output.norm('translation') <= b
Ejemplo n.º 3
0
def test_se2_se2g_randomgen_translation_empty_interval():
    interval = ()
    given_output = se2.se2g_randomgen_translation(interval)
    assert 0 <= given_output.norm('translation') <= 10
Ejemplo n.º 4
0
def test_se2_se2g_randomgen_translation_b_negative_interval():
    interval = (3, -1)
    with assert_raises(Exception):
        se2.se2g_randomgen_translation(interval)
Ejemplo n.º 5
0
def test_se2_se2g_randomgen_translation_swapped_interval():
    interval = (3, 1)
    with assert_raises(Exception):
        se2.se2g_randomgen_translation(interval)
Ejemplo n.º 6
0
def test_se2_se2g_randomgen_translation_insane_interval():
    interval = (1, 2, 3)
    with assert_raises(Exception):
        se2.se2g_randomgen_translation(interval)