Exemplo n.º 1
0
    def test_finalize(self):
        f = OutPath()
        path = str(f)

        self.assertTrue(os.path.isfile(path))
        f._finalize()
        self.assertFalse(os.path.isfile(path))
Exemplo n.º 2
0
    def test_new_outpath(self):
        f = OutPath()
        self.assertIsInstance(f, OutPath)
        self.assertTrue(f.is_file())

        g = OutPath(dir=True)
        self.assertIsInstance(g, OutPath)
        self.assertTrue(g.is_dir())
Exemplo n.º 3
0
 def test_new_outpath_context_mgr(self):
     with OutPath() as f:
         path = str(f)
         self.assertIsInstance(f, OutPath)
         self.assertTrue(os.path.isfile(path))
     self.assertFalse(os.path.isfile(path))