Exemple #1
0
 def test_simdir(self):
     x = io.simdir()
     self.assertTrue(x is not None)
     night = '20150101'
     x = io.simdir(night)
     self.assertTrue(x.endswith(night))
     x = io.simdir(night, mkdir=True)
     self.assertTrue(os.path.exists(x))
Exemple #2
0
 def test_simdir(self):
     x = io.simdir()
     self.assertTrue(x is not None)
     night = '20150101'
     x = io.simdir(night)
     self.assertTrue(x.endswith(night))
     x = io.simdir(night, mkdir=True)
     self.assertTrue(os.path.exists(x))
Exemple #3
0
    def test_simdir(self):
        x = io.simdir()
        self.assertTrue(x is not None)
        night = '20150101'
        expid = 123
        x = io.simdir(night, expid)
        self.assertTrue(x.endswith(str(expid)))
        x = io.simdir(int(night), expid)
        self.assertTrue(x.endswith(str(expid)))

        #- If providing night, must also provide expid
        with self.assertRaises(ValueError):
            x = io.simdir(night, mkdir=True)
Exemple #4
0
    def test_simdir(self):
        x = io.simdir()
        self.assertTrue(x is not None)
        night = '20150101'
        expid = 123
        x = io.simdir(night, expid)
        self.assertTrue(x.endswith(str(expid)))
        x = io.simdir(int(night), expid)
        self.assertTrue(x.endswith(str(expid)))

        #- If providing night, must also provide expid
        with self.assertRaises(ValueError):
            x = io.simdir(night, mkdir=True)