diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-22 07:22:56 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-22 07:22:56 -0400 |
commit | ff9099051e0daff7b08035713eeca5696ab3217a (patch) | |
tree | 13a391e9010e9e0b99ff403ec2fd0252d460ab5a /test/test_farm.py | |
parent | e3c0b4b2c7d2a92344d30a25467a1e863bbb7d31 (diff) | |
download | python-coveragepy-git-ff9099051e0daff7b08035713eeca5696ab3217a.tar.gz |
The best way to get py3k support: same source runs on both, with some contortions.
Diffstat (limited to 'test/test_farm.py')
-rw-r--r-- | test/test_farm.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_farm.py b/test/test_farm.py index 6e8f3467..6200611d 100644 --- a/test/test_farm.py +++ b/test/test_farm.py @@ -1,7 +1,9 @@ """Run tests in the farm subdirectory. Designed for nose.""" import filecmp, fnmatch, glob, os, shutil, sys -from coverage.backward import run_command + +sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k +from backtest import run_command, execfile # pylint: disable-msg=W0622 def test_farm(clean_only=False): @@ -133,7 +135,7 @@ class FarmTestCase(object): if not cmd: continue retcode, output = run_command(cmd) - print output, + print(output.rstrip()) if outfile: open(outfile, "a+").write(output) if retcode: @@ -278,7 +280,7 @@ def main(): for test in test_farm(clean_only=True): test[0].run_fully() else: - print "Need an operation: run, out, clean" + print("Need an operation: run, out, clean") # So that we can run just one farm run.py at a time. if __name__ == '__main__': |