Added the test data files sent by Matthias Richter (see #1)

Had to make a few changes to ensure that they open correctly
This commit is contained in:
Chris Kerr
2014-11-06 09:54:38 +00:00
parent 045f15c855
commit ef6e7335e9
3 changed files with 41 additions and 4 deletions

View File

@@ -122,7 +122,7 @@ def assert_MPR_matches_MPT(mpr, mpt, comments):
assert_array_almost_equal(mpr.data["time/s"],
mpt["time/s"],
decimal=4) # 5 digits in CSV
decimal=2) # 2 digits in CSV
assert_field_matches("control/V/mA", decimal=6)
assert_field_matches("control/V", decimal=6)
@@ -178,3 +178,18 @@ def test_MPR6_matches_MPT6():
mpt, comments = MPTfile(os.path.join(testdata_dir, 'bio-logic6.mpt'))
mpr.data = mpr.data[:958] # .mpt file is incomplete
assert_MPR_matches_MPT(mpr, mpt, comments)
## Tests for issue #1 -- new dtypes ##
def test_CV_C01():
mpr = MPRfile(os.path.join(testdata_dir, 'CV_C01.mpr'))
mpt, comments = MPTfile(os.path.join(testdata_dir, 'CV_C01.mpt'))
assert_MPR_matches_MPT(mpr, mpt, comments)
def test_CA_455nm():
mpr = MPRfile(os.path.join(testdata_dir, '121-CA-455nm-6V_30min_C01.mpr'))
mpt, comments = MPTfile(os.path.join(testdata_dir, '121-CA-455nm-6V_30min_C01.mpt'))
assert_MPR_matches_MPT(mpr, mpt, comments)