Mercurial > treepkg
diff test/test_builder.py @ 185:e1c7cd896310
Rework test/filesupport.py so that test cases always use their own
temporary directory. Before, the test cases had to ensure this
themselves.
Adapt the test cases.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Thu, 26 Jun 2008 16:23:26 +0000 |
parents | 72e41b27f224 |
children | 2622bf5ed5bd |
line wrap: on
line diff
--- a/test/test_builder.py Wed Jun 25 15:15:30 2008 +0000 +++ b/test/test_builder.py Thu Jun 26 16:23:26 2008 +0000 @@ -45,7 +45,7 @@ def test_init_pbuilder(self): """Tests the PBuilder.init_pbuilder method.""" - basedir = self.create_temp_dir(self.id()) + basedir = self.create_temp_dir("pbuilder") pbuilderrc = os.path.join(basedir, "pbuilderrc") builder = PBuilder(pbuilderrc, self.root_command) old_stdout = sys.stdout @@ -106,7 +106,7 @@ def test_init_pbuilder_run_twice(self): """Tests whether PBuilder.init_pbuilder prints an error when run twice. """ - basedir = self.create_temp_dir(self.id()) + basedir = self.create_temp_dir("pbuilder") # run it once pbuilderrc = os.path.join(basedir, "pbuilderrc") @@ -220,7 +220,7 @@ binary_dir_name = self.temp_file_name("binary") if os.path.exists(binary_dir_name): os.rmdir(binary_dir_name) - env_test_file = self.temp_file_name(self.id() + "_envtest", remove=True) + env_test_file = self.temp_file_name("envtest") # sanity check: the binary directory must not exist yet. self.failIf(os.path.exists(binary_dir_name)) # sanity check: the environment variable TREEPKG_TEST must not @@ -341,7 +341,7 @@ def setUp(self): PBuilderTests.setUp(self) - self.temp_base_dir = self.create_temp_dir(self.id()) + self.temp_base_dir = self.create_temp_dir("pbuilder") self.minimal_packge_dir = os.path.join(self.temp_base_dir, "minimal-1.0") self.create_files(self.minimal_packge_dir, self.minimal_package)