[test] fix pyunit checker test (due to uncleaned PYTHONPATH manipulation) stable apycot-version-2.2.3
authorDavid Douard <david.douard@logilab.fr>
Wed, 11 Apr 2012 11:17:26 +0200
branchstable
changeset 828 5d1b7e01c4bc
parent 827 e599031dee15
child 829 ae91a0cc488e
[test] fix pyunit checker test (due to uncleaned PYTHONPATH manipulation)
test/unittest_task.py
--- a/test/unittest_task.py	Wed Apr 11 10:06:51 2012 +0200
+++ b/test/unittest_task.py	Wed Apr 11 11:17:26 2012 +0200
@@ -382,10 +382,14 @@
 class EnvironmentTrackerMixinTC(TestCase):
 
     def setUp(self):
+        self._PYTHONPATH = os.environ.get('PYTHONPATH', '')
         os.environ['PYTHONPATH'] = ''
         self.tracker = Test(TestConfig('yo', dependencies=(Environment('pypasax'),)),
                             MockTestWriter(), {})
 
+    def tearDown(self):
+        os.environ['PYTHONPATH'] = self._PYTHONPATH
+
     def test_update_clean_env(self):
         lc_all = os.environ.get('LC_ALL')
         self.tracker.update_env('key', 'LC_ALL', 'XXXX')