diff options
Diffstat (limited to 'test/backtest.py')
-rw-r--r-- | test/backtest.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/backtest.py b/test/backtest.py index 21a14d6d..12bdbc97 100644 --- a/test/backtest.py +++ b/test/backtest.py @@ -12,18 +12,18 @@ try: except ImportError: def run_command(cmd): """Run a command in a subprocess. - + Returns the exit code and the combined stdout and stderr. - + """ _, stdouterr = os.popen4(cmd) return 0, stdouterr.read() else: def run_command(cmd): """Run a command in a subprocess. - + Returns the exit code and the combined stdout and stderr. - + """ if sys.hexversion > 0x03000000 and cmd.startswith("coverage "): @@ -36,13 +36,13 @@ else: stderr=subprocess.STDOUT ) retcode = proc.wait() - + # Get the output, and canonicalize it to strings with newlines. output = proc.stdout.read() if not isinstance(output, str): output = output.decode('utf-8') output = output.replace('\r', '') - + return retcode, output # No more execfile in Py3k |