Exemple #1
0
def test_se2_se2g_randomgen_fro_restricted_interval():
    a = 2.3
    b = 2.5
    interval = (a, b)
    given_output = se2.se2g_randomgen_fro(interval)
    print(str(given_output.get))
    assert a <= given_output.norm('fro') <= b
Exemple #2
0
def test_se2_se2g_randomgen_fro_a_less_sqrt3():
    interval = (1.71, 5)
    with assert_raises(Exception):
        se2.se2g_randomgen_fro(interval)
Exemple #3
0
def test_se2_se2g_randomgen_fro_b_negative_interval():
    interval = (3, -1)
    with assert_raises(Exception):
        se2.se2g_randomgen_fro(interval)
Exemple #4
0
def test_se2_se2g_randomgen_fro_swapped_interval():
    interval = (3, 1)
    with assert_raises(Exception):
        se2.se2g_randomgen_fro(interval)
Exemple #5
0
def test_se2_se2g_randomgen_fro_insane_interval():
    interval = (1, 2, 3)
    with assert_raises(Exception):
        se2.se2g_randomgen_fro(interval)
Exemple #6
0
def test_se2_se2g_randomgen_fro_bigger_interval():
    a = np.sqrt(3)
    b = 15
    interval = (a, b)
    given_output = se2.se2g_randomgen_fro(interval)
    assert a <= given_output.norm('fro') <= b
Exemple #7
0
def test_se2_se2g_randomgen_fro_empty_interval():
    interval = ()
    given_output = se2.se2g_randomgen_fro(interval)
    assert np.sqrt(3) <= given_output.norm('fro') <= 10