diff options
author | Barry Warsaw <barry@python.org> | 2000-10-11 21:26:03 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2000-10-11 21:26:03 (GMT) |
commit | 7e3e1c1ece9173b10b2e89848f814d0c346a869d (patch) | |
tree | 8f38541ba2086e32d332a1659851f2341300ed46 /Lib/test/test_grammar.py | |
parent | 6fe9bacb8c12c0382a299e852536b87a825ac905 (diff) | |
download | cpython-7e3e1c1ece9173b10b2e89848f814d0c346a869d.zip cpython-7e3e1c1ece9173b10b2e89848f814d0c346a869d.tar.gz cpython-7e3e1c1ece9173b10b2e89848f814d0c346a869d.tar.bz2 |
Added test cases for extended printing to an instance. This picked up
a bug in JPython where the instance had to have a flush() method.
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 68cae81..0ca5a46 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -268,10 +268,18 @@ print >> sys.stdout print >> sys.stdout, 0 or 1, 0 or 1, print >> sys.stdout, 0 or 1 -# test print >> None +# test printing to an instance class Gulp: def write(self, msg): pass +gulp = Gulp() +print >> gulp, 1, 2, 3 +print >> gulp, 1, 2, 3, +print >> gulp +print >> gulp, 0 or 1, 0 or 1, +print >> gulp, 0 or 1 + +# test print >> None def driver(): oldstdout = sys.stdout sys.stdout = Gulp() |