summaryrefslogtreecommitdiff
path: root/tests/backtest.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-14 09:27:27 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-14 09:27:27 -0500
commite25a505dfece0b60c22ea871796d7159a300d771 (patch)
tree71cdfdfbe6f1a417bb883aa42c55d400cdd59fad /tests/backtest.py
parent2ddec8a0a5b816470f6a6982468d521d4da2d322 (diff)
downloadpython-coveragepy-git-e25a505dfece0b60c22ea871796d7159a300d771.tar.gz
Move some code to where it belongs
Diffstat (limited to 'tests/backtest.py')
-rw-r--r--tests/backtest.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/backtest.py b/tests/backtest.py
index 73b1067d..50834721 100644
--- a/tests/backtest.py
+++ b/tests/backtest.py
@@ -4,31 +4,6 @@
# (Redefining built-in blah)
# The whole point of this file is to redefine built-ins, so shut up about it.
-import subprocess
-
-
-# This isn't really a backward compatibility thing, should be moved into a
-# helpers file or something.
-def run_command(cmd):
- """Run a command in a sub-process.
-
- Returns the exit status code and the combined stdout and stderr.
-
- """
- proc = subprocess.Popen(cmd, shell=True,
- stdin=subprocess.PIPE, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT
- )
- output, _ = proc.communicate()
- status = proc.returncode
-
- # Get the output, and canonicalize it to strings with newlines.
- if not isinstance(output, str):
- output = output.decode('utf-8')
- output = output.replace('\r', '')
-
- return status, output
-
# No more execfile in Py3
try: