mirror of
https://github.com/echemdata/galvani.git
synced 2025-12-14 09:15:34 +00:00
24 lines
684 B
Python
24 lines
684 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import os.path
|
|
|
|
from nose.tools import ok_, eq_, raises
|
|
|
|
from .. import MPTfile
|
|
|
|
testdata_dir = os.path.join(os.path.dirname(__file__), 'testdata')
|
|
|
|
|
|
def test_open_MPT():
|
|
mpt1, comments = MPTfile(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"])
|
|
|
|
|
|
@raises(ValueError)
|
|
def test_open_MPT_fails_for_bad_file():
|
|
mpt1 = MPTfile(os.path.join(testdata_dir, 'bio-logic1.mpr'))
|