diff options
author | Armin Rigo <arigo@tunes.org> | 2016-03-03 18:13:28 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2016-03-03 18:13:28 +0100 |
commit | d4ad64c1a14bf09fb48cdd3627d8f1b62cbb45c2 (patch) | |
tree | cc0fcc7949bc822d1128969adc2811976bd85930 /pypy/module | |
parent | cleanup (diff) | |
download | pypy-d4ad64c1a14bf09fb48cdd3627d8f1b62cbb45c2.tar.gz pypy-d4ad64c1a14bf09fb48cdd3627d8f1b62cbb45c2.tar.bz2 pypy-d4ad64c1a14bf09fb48cdd3627d8f1b62cbb45c2.zip |
update cffi/d7ec0dceb9ed
Diffstat (limited to 'pypy/module')
-rw-r--r-- | pypy/module/test_lib_pypy/cffi_tests/embedding/test_basic.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pypy/module/test_lib_pypy/cffi_tests/embedding/test_basic.py b/pypy/module/test_lib_pypy/cffi_tests/embedding/test_basic.py index 1969e27aa5..7a642d8abc 100644 --- a/pypy/module/test_lib_pypy/cffi_tests/embedding/test_basic.py +++ b/pypy/module/test_lib_pypy/cffi_tests/embedding/test_basic.py @@ -33,8 +33,12 @@ def prefix_pythonpath(): pythonpath.insert(0, cffi_base) return os.pathsep.join(pythonpath) -def setup_module(mod): - mod.org_env = os.environ.copy() +def copy_away_env(): + global org_env + try: + org_env + except NameError: + org_env = os.environ.copy() class EmbeddingTests: @@ -122,6 +126,7 @@ class EmbeddingTests: os.chdir(curdir) def patch_environment(self): + copy_away_env() path = self.get_path() # for libpypy-c.dll or Python27.dll path = os.path.split(sys.executable)[0] + os.path.pathsep + path |