Пример #1
0
def test_open_MPT_csv():
    mpt1, comments = MPTfileCSV(os.path.join(testdata_dir, 'bio_logic1.mpt'))
    eq_(comments, [])
    eq_(mpt1.fieldnames, [
        "mode", "ox/red", "error", "control changes", "Ns changes",
        "counter inc.", "time/s", "control/V/mA", "Ewe/V", "dq/mA.h", "P/W",
        "<I>/mA", "(Q-Qo)/mA.h", "x"
    ])
Пример #2
0
def test_open_MPT_csv_fails_for_bad_file():
    mpt1 = MPTfileCSV(os.path.join(testdata_dir, 'bio_logic1.mpr'))
Пример #3
0
def test_open_MPT_csv_fails_for_bad_file(testdata_dir):
    with pytest.raises((ValueError, UnicodeDecodeError)):
        MPTfileCSV(os.path.join(testdata_dir, 'bio_logic1.mpr'))