当前位置: 首页>>代码示例>>Python>>正文


Python TempDirectory.cleanup_all方法代码示例

本文整理汇总了Python中testfixtures.TempDirectory.cleanup_all方法的典型用法代码示例。如果您正苦于以下问题:Python TempDirectory.cleanup_all方法的具体用法?Python TempDirectory.cleanup_all怎么用?Python TempDirectory.cleanup_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在testfixtures.TempDirectory的用法示例。

在下文中一共展示了TempDirectory.cleanup_all方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: tearDown

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
 def tearDown(self):
     """
     Delete all the temporary directories and files created during this
     testing session.
     """
     for replicate in range(1, 6):
         file_name = "original_mutated_%d.fasta" % replicate
         if os.path.exists(file_name):
             os.remove(file_name)
     if os.path.exists("original_snpListMutated.txt"):
         os.remove("original_snpListMutated.txt")
     TempDirectory.cleanup_all()
开发者ID:CFSAN-Biostatistics,项目名称:snp-mutator,代码行数:14,代码来源:test_snpmutator.py


示例2: test_cleanup_all

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
    def test_cleanup_all(self):
        d1 = TempDirectory()
        d2 = TempDirectory()

        assert os.path.exists(d1.path) is True
        p1 = d1.path
        assert os.path.exists(d2.path) is True
        p2 = d2.path

        TempDirectory.cleanup_all()

        assert os.path.exists(p1) is False
        assert os.path.exists(p2) is False
开发者ID:Simplistix,项目名称:testfixtures,代码行数:15,代码来源:test_tempdirectory.py


示例3: IniFileConfigurationLoaderTestCase

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
class IniFileConfigurationLoaderTestCase(BaseTestCase):

    def setUp(self):
        super(IniFileConfigurationLoaderTestCase, self).setUp()
        self.tmp_dir = TempDirectory()

    def tearDown(self):
        super(IniFileConfigurationLoaderTestCase, self).tearDown()
        self.tmp_dir.cleanup_all()

    def test_skip_invalid_ini_file(self):
        from prettyconf.loaders import IniFileConfigurationLoader

        test_file = self.tmp_dir.write('some/strange/config.cfg', '*&ˆ%$#$%ˆ&*('.encode('utf8'))
        with self.assertRaises(InvalidConfigurationFile):
            IniFileConfigurationLoader(test_file)
开发者ID:erickwilder,项目名称:prettyconf,代码行数:18,代码来源:test_loaders.py


示例4: tearDown

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
def tearDown(test):
    TempDirectory.cleanup_all()
开发者ID:yoyossy,项目名称:testfixtures__Simplistix,代码行数:4,代码来源:test_tempdirectory.py


示例5: tearDown

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
 def tearDown(self):
     TempDirectory.cleanup_all()
开发者ID:elifesciences,项目名称:elife-bot,代码行数:4,代码来源:test_activity_approve_publication.py


示例6: tearDownClass

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
	def tearDownClass(cls):
		TempDirectory.cleanup_all()
开发者ID:Parks-Laboratory,项目名称:rqtl_pipeline,代码行数:4,代码来源:test_make_phenotype_files.py


示例7: tearDownAll

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
 def tearDownAll():
     """
     Delete all the temporary directories and files created during this
     testing session.
     """
     TempDirectory.cleanup_all()
开发者ID:CFSAN-Biostatistics,项目名称:snp-pipeline,代码行数:8,代码来源:test_cfsan_snp_pipeline.py


示例8: tearDown

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
 def tearDown(self):
     TempDirectory.cleanup_all()
     self.activity.clean_tmp_dir()
开发者ID:elifesciences,项目名称:elife-bot,代码行数:5,代码来源:test_activity_publication_email.py


示例9: tearDown

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
def tearDown(test):
    TempDirectory.cleanup_all()
    LogCapture.uninstall_all()
开发者ID:AtonLerin,项目名称:maya_python_packages,代码行数:5,代码来源:test_docs.py


示例10: tearDownModule

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
def tearDownModule():
    """ """
    TempDirectory.cleanup_all()
开发者ID:aodag,项目名称:sns,代码行数:5,代码来源:test_sns.py


示例11: tearDown

# 需要导入模块: from testfixtures import TempDirectory [as 别名]
# 或者: from testfixtures.TempDirectory import cleanup_all [as 别名]
 def tearDown(self):
     TempDirectory.cleanup_all()
     self.env.destroy()
开发者ID:assamite,项目名称:creamas,代码行数:5,代码来源:test_logging.py



注:本文中的testfixtures.TempDirectory.cleanup_all方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。