Ejemplo n.º 1
0
    def test_destructor(self):
        f = OutPath()
        path = str(f)

        self.assertTrue(os.path.isfile(path))
        f._destructor()
        self.assertFalse(os.path.isfile(path))
Ejemplo n.º 2
0
    def test_destructor(self):
        f = OutPath()
        path = str(f)

        self.assertTrue(os.path.isfile(path))
        f._destructor()
        self.assertFalse(os.path.isfile(path))
Ejemplo n.º 3
0
    def test_finalize(self):
        f = OutPath()
        path = str(f)

        self.assertTrue(os.path.isfile(path))
        f._finalize()
        self.assertFalse(os.path.isfile(path))
Ejemplo n.º 4
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())
Ejemplo n.º 5
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())
Ejemplo n.º 6
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))