コード例 #1
0
def test_se2_se2g_randomgen_standard_lamb_0_restricted_interval_1_2():
    a = 1
    b = 2
    lamb = 0
    interval = (a, b)
    given_output = se2.se2g_randomgen(interval, lamb=lamb)
    assert a <= given_output.norm('standard', lamb=lamb) <= b
コード例 #2
0
def test_se2_se2g_randomgen_standard_lamb_positive_strict_interval():
    a = 1.5
    b = 2
    lamb = 1
    interval = (a, b)
    given_output = se2.se2g_randomgen(interval, lamb=lamb)
    assert a <= given_output.norm('standard', lamb=lamb) <= b
コード例 #3
0
def test_se2_se2g_randomgen_standard_lamb_0_no_restriction_interval_dx():
    a = 1
    b = 15
    lamb = 0
    interval = (a, b)
    given_output = se2.se2g_randomgen(interval, lamb=lamb)
    assert a <= given_output.norm('standard', lamb=lamb) <= np.pi
コード例 #4
0
def test_se2_se2g_randomgen_standard_lamb_positive_empty_interval():
    interval = ()
    element = se2.se2g_randomgen(interval)
    assert 0 <= element.norm('standard') <= 10
コード例 #5
0
def test_se2_se2g_randomgen_standard_lamb_positive_insane_interval():
    interval = (1, 2, 3)
    with assert_raises(Exception):
        se2.se2g_randomgen(interval)
コード例 #6
0
def test_se2_se2g_randomgen_standard_lamb_0_interval_insane():
    interval = (7, 8)
    with assert_raises(Exception):
        se2.se2g_randomgen(interval, lamb=0)
コード例 #7
0
def test_se2_se2g_randomgen_standard_lamb_negative():
    interval = (1, 2)
    with assert_raises(Exception):
        se2.se2g_randomgen(interval, lamb=-1)
コード例 #8
0
def test_se2_se2g_randomgen_standard_b_negative_interval():
    interval = (3, -1)
    with assert_raises(Exception):
        se2.se2g_randomgen(interval)
コード例 #9
0
def test_se2_se2g_randomgen_standard_swapped_interval():
    interval = (3, 1)
    with assert_raises(Exception):
        se2.se2g_randomgen(interval)