diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-12-18 21:39:15 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-12-19 18:37:32 +0100 |
| commit | 1d9fc5caa947ff4ee72180185e91a9a145171712 (patch) | |
| tree | 843e1b7d53f2c38e5abc20e2564f7fdd68d43635 /tests/model_regress | |
| parent | 337cd0983699ea5739746fb2d5066f38f8834bbb (diff) | |
Made model_regress unpickling test CWD-independent
Refs #24007. Thanks Tim Graham for his help with the patch.
Diffstat (limited to 'tests/model_regress')
| -rw-r--r-- | tests/model_regress/test_pickle.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/model_regress/test_pickle.py b/tests/model_regress/test_pickle.py index e52dc58783..5f97a72606 100644 --- a/tests/model_regress/test_pickle.py +++ b/tests/model_regress/test_pickle.py @@ -83,7 +83,10 @@ print(article.headline)""" script.write(script_template % pickle.dumps(a)) script.flush() try: - result = subprocess.check_output([sys.executable, script.name]) + result = subprocess.check_output( + [sys.executable, script.name], + env={'PYTHONPATH': ':'.join(sys.path)} + ) except subprocess.CalledProcessError: self.fail("Unable to reload model pickled data") self.assertEqual(result.strip().decode(), "Some object") |
