[Python-checkins] cpython (merge 3.4 -> default): Merge: #22512: move distutils rpm test's .rpmdb to testing tmpdir.

r.david.murray python-checkins at python.org
Wed Oct 1 02:54:28 CEST 2014


https://hg.python.org/cpython/rev/4877f91a0389
changeset:   92700:4877f91a0389
parent:      92698:c8e7362875a8
parent:      92699:ec6cee80926f
user:        R David Murray <rdmurray at bitdance.com>
date:        Tue Sep 30 20:53:55 2014 -0400
summary:
  Merge: #22512: move distutils rpm test's .rpmdb to testing tmpdir.

files:
  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
--- a/Lib/distutils/tests/test_bdist_rpm.py
+++ b/Lib/distutils/tests/test_bdist_rpm.py
@@ -24,6 +24,7 @@
 """
 
 class BuildRpmTestCase(support.TempdirManager,
+                       support.EnvironGuard,
                        support.LoggingSilencer,
                        unittest.TestCase):
 
@@ -54,6 +55,7 @@
     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 @@
     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)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list