Esempio n. 1
0
def test_calccumsum_01_array_float():
    data = np.array([[1, 910], [2, 45]], dtype="float")
    cn, c1, yd, yo, zd, zo = calccumsum(data)
    assert_true(np.all(cn == array([1, 2])))
    assert_true(np.all(c1 == array([910, 45])))
    assert_true(np.all(yd == array([955, 45])))
    assert_true(np.all(yo == array([1000, 90])))
    assert_true(np.all(zd == array([910, 955])))
    assert_true(np.all(zo == array([910, 1000])))
Esempio n. 2
0
def test_calccumsum_00_file():
    data = loadfile(TESTDIR + "test00.21")
    cn, c1, yd, yo, zd, zo = calccumsum(data)
    assert_equal(cn, 1)
    assert_equal(c1, 1)
    assert_equal(yd, 1)
    assert_equal(yo, 1)
    assert_equal(zd, 1)
    assert_equal(zo, 1)
Esempio n. 3
0
def test_calccumsum_bad3():
    data = FIXTUREBAD3
    print(type(data), data)
    with assert_raises(ValueError):
        cn, c1, yd, yo, zd, zo = calccumsum(data)
Esempio n. 4
0
def test_calccumsum_bad2():
    data = FIXTUREBAD2
    with assert_raises(ValueError):
        cn, c1, yd, yo, zd, zo = calccumsum(data)
Esempio n. 5
0
def test_calccumsum_int():
    data = FIXTURE3
    cn, c1, yd, yo, zd, zo = calccumsum(data)
Esempio n. 6
0
def test_calccumsum_float():
    data = FIXTURE1
    cn, c1, yd, yo, zd, zo = calccumsum(data)
def test_01():
    data = loadfile(TESTDIR + "test01.21")
    cn, c1, yd, yo, zd, zo = calccumsum(data)

    pass