summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-10-01 00:57:24 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-10-01 00:57:24 (GMT)
commitece9d5a91fbc4ada2d4e17e9c52d4a1658552dca (patch)
treebdbe7ed6209a8c0dbfa9654c2eb7ecc9a9006b9b /Lib/distutils
parentb10b8ead139f75a78881e26bef9bdb88d1f3fa0f (diff)
downloadcpython-ece9d5a91fbc4ada2d4e17e9c52d4a1658552dca.zip
cpython-ece9d5a91fbc4ada2d4e17e9c52d4a1658552dca.tar.gz
cpython-ece9d5a91fbc4ada2d4e17e9c52d4a1658552dca.tar.bz2
#22512: move distutils rpm test's .rpmdb to testing tmpdir.
Patch by Francis MB.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_bdist_rpm.py3
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 83d4065..2d4bca4 100644
--- a/Lib/distutils/tests/test_bdist_rpm.py
+++ b/Lib/distutils/tests/test_bdist_rpm.py
@@ -25,6 +25,7 @@ setup(name='foo', version='0.1', py_modules=['foo'],
"""
class BuildRpmTestCase(support.TempdirManager,
+ support.EnvironGuard,
support.LoggingSilencer,
unittest.TestCase):
@@ -50,6 +51,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)
@@ -92,6 +94,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)