Commit 1d9fc5ca authored by Claude Paroz's avatar Claude Paroz
Browse files

Made model_regress unpickling test CWD-independent

Refs #24007. Thanks Tim Graham for his help with the patch.
parent 337cd098
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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")