Deal with yet another format - with more flags data (I think)

This commit is contained in:
Chris Kerr
2013-12-08 14:07:32 +00:00
parent fa14ba94f8
commit 509b75a81f
2 changed files with 47 additions and 11 deletions

View File

@@ -41,18 +41,27 @@ def test_open_MPT_csv_fails_for_bad_file():
mpt1 = MPTfileCSV(os.path.join(testdata_dir, 'bio-logic1.mpr'))
def test_MPR1_read_dates():
def test_open_MPR1():
mpr1 = MPRfile(os.path.join(testdata_dir, 'bio-logic1.mpr'))
## Check the dates as a basic test that it has been read properly
eq_(mpr1.startdate, date(2011, 10, 29))
eq_(mpr1.enddate, date(2011, 10, 31))
def test_MPR2_read_dates():
def test_open_MPR2():
mpr2 = MPRfile(os.path.join(testdata_dir, 'bio-logic2.mpr'))
## Check the dates as a basic test that it has been read properly
eq_(mpr2.startdate, date(2012, 9, 27))
eq_(mpr2.enddate, date(2012, 9, 27))
def test_open_MPR3():
mpr2 = MPRfile(os.path.join(testdata_dir, 'bio-logic3.mpr'))
## Check the dates as a basic test that it has been read properly
eq_(mpr2.startdate, date(2013, 3, 27))
eq_(mpr2.enddate, date(2013, 3, 27))
@raises(ValueError)
def test_open_MPR_fails_for_bad_file():
mpr1 = MPRfile(os.path.join(testdata_dir, 'arbin1.res'))