summaryrefslogtreecommitdiffstats
path: root/Lib/packaging
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-06-10 02:29:43 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-06-10 02:29:43 (GMT)
commit2b612220e4ddaea89058065f98735590b710550d (patch)
treeb70f7040d036676dd46cbb35102dba611cefbd94 /Lib/packaging
parentf53cd89006ccd2144e5707c3fd4ccf5c96a3ec20 (diff)
downloadcpython-2b612220e4ddaea89058065f98735590b710550d.zip
cpython-2b612220e4ddaea89058065f98735590b710550d.tar.gz
cpython-2b612220e4ddaea89058065f98735590b710550d.tar.bz2
Clean up extra environment variable after packaging tests.
packaging.util.check_environ will define HOME and PLAT if they don’t exist; for some reason, it does not define PLAT when running the tests from a checkout (so no regrtest warning) but does when running from an installed Python. Cleaning up the envvar in test_dist fixes the warning on my machine, but I suspect that a test runner using a different order to run files or running them in parallel may have PLAT defined in its environment because of another test. Quite a lot of code ends up calling check_environ; maybe we should just clean up PLAT in every test. For now I’m doing this simple fix, we’ll see if we get bug reports.
Diffstat (limited to 'Lib/packaging')
-rw-r--r--Lib/packaging/tests/test_dist.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/packaging/tests/test_dist.py b/Lib/packaging/tests/test_dist.py
index fb6d524..e1c5ff0 100644
--- a/Lib/packaging/tests/test_dist.py
+++ b/Lib/packaging/tests/test_dist.py
@@ -35,7 +35,7 @@ class DistributionTestCase(support.TempdirManager,
support.EnvironRestorer,
unittest.TestCase):
- restore_environ = ['HOME']
+ restore_environ = ['HOME', 'PLAT']
def setUp(self):
super(DistributionTestCase, self).setUp()