diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-10-01 00:53:21 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-10-01 00:53:21 (GMT) |
commit | e6edc03a6147c7447741dc5b163730dcb44dda4c (patch) | |
tree | f347c757ffa16d2a8f1f9623e81a47c544e25d9f /Lib | |
parent | b6271f2d2b3f893ebf80f7ede85b70bd789c1efb (diff) | |
download | cpython-e6edc03a6147c7447741dc5b163730dcb44dda4c.zip cpython-e6edc03a6147c7447741dc5b163730dcb44dda4c.tar.gz cpython-e6edc03a6147c7447741dc5b163730dcb44dda4c.tar.bz2 |
#22512: move distutils rpm test's .rpmdb to testing tmpdir.
Patch by Francis MB.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/tests/test_bdist_rpm.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |