Esempio n. 1
0
def test_reader(filename,length,ncols):
    besancon_model = data_path(filename)
    with open(besancon_model,'r') as f:
        data = f.read()
    B = besancon.core.parse_besancon_model_string(data)
    B.pprint()
    assert_equal(len(B),length)
    assert_equal(len(B.columns),ncols)
Esempio n. 2
0
def test_reader(filename, length, ncols, d1, mv1):
    besancon_model = data_path(filename)
    with open(besancon_model, 'r') as f:
        data = f.read()
    B = besancon.core.parse_besancon_model_string(data)
    B.pprint()
    assert_equal(len(B), length)
    assert_equal(len(B.columns), ncols)
    assert B['Dist'][0] == d1
    assert B['Mv'][0] == mv1
Esempio n. 3
0
def test_besancon_reader():
    #assert os.path.exists('besancon_test.txt')
    B = asciitable.read('t/besancon_test.txt',Reader=besancon.BesanconFixed,guess=False)
    assert_equal(len(B),12)