Allowed Python executable names other than python in test from refs #24007.

This commit is contained in:
Collin Anderson 2014-12-17 17:49:50 -05:00 committed by Tim Graham
parent 493ab45349
commit 4fb38b7307
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import datetime
import pickle
import subprocess
import sys
import tempfile
import warnings
@ -82,7 +83,7 @@ print(article.headline)"""
script.write(script_template % pickle.dumps(a))
script.flush()
try:
result = subprocess.check_output(['python', script.name])
result = subprocess.check_output([sys.executable, script.name])
except subprocess.CalledProcessError:
self.fail("Unable to reload model pickled data")
self.assertEqual(result.strip().decode(), "Some object")