diff options
author | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
commit | be19ed77ddb047e02fe94d142181062af6d99dcc (patch) | |
tree | 70f214e06554046fcccbadeb78665f25e07ce965 /Lib/test/test_mutants.py | |
parent | 452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff) | |
download | cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2 |
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed:
doctests are the major category (and I hope to be able to augment the
refactoring tool to refactor bona fide doctests soon);
other code generating print statements in strings is the minor category.
(Oh, and I don't know if the compiler package works.)
Diffstat (limited to 'Lib/test/test_mutants.py')
-rw-r--r-- | Lib/test/test_mutants.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_mutants.py b/Lib/test/test_mutants.py index 6215226..a710248 100644 --- a/Lib/test/test_mutants.py +++ b/Lib/test/test_mutants.py @@ -135,13 +135,13 @@ def test_one(n): # same size. mutate = 1 if verbose: - print "trying w/ lengths", len(dict1), len(dict2), + print("trying w/ lengths", len(dict1), len(dict2), end=' ') while dict1 and len(dict1) == len(dict2): if verbose: - print ".", + print(".", end=' ') c = dict1 == dict2 if verbose: - print + print() # Run test_one n times. At the start (before the bugs were fixed), 20 # consecutive runs of this test each blew up on or before the sixth time @@ -186,7 +186,7 @@ class Parent: # the expected-output file doesn't need to change. f = open(TESTFN, "w") -print >> f, Parent().__dict__ +print(Parent().__dict__, file=f) f.close() os.unlink(TESTFN) @@ -207,7 +207,7 @@ class Machiavelli: # Michael sez: "doesn't crash without this. don't know why." # Tim sez: "luck of the draw; crashes with or without for me." - print >> f + print(file=f) return repr("machiavelli") @@ -216,7 +216,7 @@ class Machiavelli: dict[Machiavelli()] = Machiavelli() -print >> f, str(dict) +print(str(dict), file=f) f.close() os.unlink(TESTFN) del f, dict @@ -280,7 +280,7 @@ dict[Machiavelli3(2)] = Machiavelli3(0) f = open(TESTFN, "w") try: try: - print >> f, dict[Machiavelli3(2)] + print(dict[Machiavelli3(2)], file=f) except KeyError: pass finally: |