From e6edc03a6147c7447741dc5b163730dcb44dda4c Mon Sep 17 00:00:00 2001 From: R David Murray Date: Tue, 30 Sep 2014 20:53:21 -0400 Subject: #22512: move distutils rpm test's .rpmdb to testing tmpdir. Patch by Francis MB. --- Lib/distutils/tests/test_bdist_rpm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/distutils/tests/test_bdist_rpm.py b/Lib/distutils/tests/test_bdist_rpm.py index bcbb563..25c14ab 100644 --- a/Lib/distutils/tests/test_bdist_rpm.py +++ b/Lib/distutils/tests/test_bdist_rpm.py @@ -24,6 +24,7 @@ setup(name='foo', version='0.1', py_modules=['foo'], """ class BuildRpmTestCase(support.TempdirManager, + support.EnvironGuard, support.LoggingSilencer, unittest.TestCase): @@ -54,6 +55,7 @@ class BuildRpmTestCase(support.TempdirManager, def test_quiet(self): # let's create a package tmp_dir = self.mkdtemp() + os.environ['HOME'] = tmp_dir # to confine dir '.rpmdb' creation pkg_dir = os.path.join(tmp_dir, 'foo') os.mkdir(pkg_dir) self.write_file((pkg_dir, 'setup.py'), SETUP_PY) @@ -96,6 +98,7 @@ class BuildRpmTestCase(support.TempdirManager, def test_no_optimize_flag(self): # let's create a package that brakes bdist_rpm tmp_dir = self.mkdtemp() + os.environ['HOME'] = tmp_dir # to confine dir '.rpmdb' creation pkg_dir = os.path.join(tmp_dir, 'foo') os.mkdir(pkg_dir) self.write_file((pkg_dir, 'setup.py'), SETUP_PY) -- cgit v0.12