コード例 #1
0
ファイル: test_path.py プロジェクト: nightest/qiime2
    def test_finalize(self):
        f = OutPath()
        path = str(f)

        self.assertTrue(os.path.isfile(path))
        f._finalize()
        self.assertFalse(os.path.isfile(path))
コード例 #2
0
ファイル: test_path.py プロジェクト: nightest/qiime2
    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())
コード例 #3
0
ファイル: test_path.py プロジェクト: nightest/qiime2
 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))