Ejemplo n.º 1
0
 def test_valid_YYYYMMDD(self):
     """valid_YYYYMMDD() should give known results"""
     filenames = ['rbspa_rel02_ect-hope-PA-L3_20130906_v4.0.0.cdf',
                  'rbspa_def_MagEphem_OP77Q_20150202_v1.0.0.h5',
                  '20150204_firebird-2-fu3_T89D_MagEphem.h5',
                  '20150202_firebird-2-fu3_T89D_MagEphem.h5',
                  'I_am_a_file_with_no_date.h5']
     ans = [True, True, True, True, False]
     for tst, ans in zip(filenames, ans):
         self.assertEqual(ans, t.valid_YYYYMMDD(tst))
Ejemplo n.º 2
0
 def test_valid_YYYYMMDD(self):
     """valid_YYYYMMDD() should give known results"""
     filenames = ['rbspa_rel02_ect-hope-PA-L3_20130906_v4.0.0.cdf',
                  'rbspa_def_MagEphem_OP77Q_20150202_v1.0.0.h5',
                  '20150204_firebird-2-fu3_T89D_MagEphem.h5',
                  '20150202_firebird-2-fu3_T89D_MagEphem.h5',
                  'I_am_a_file_with_no_date.h5']
     ans = [True, True, True, True, False]
     for tst, ans in zip(filenames, ans):
         self.assertEqual(ans, t.valid_YYYYMMDD(tst))