[Python-checkins] CVS: python/dist/src/Lib/test test_grammar.py,1.18,1.19

Barry Warsaw python-dev@python.org
Wed, 11 Oct 2000 14:26:06 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv6445

Modified Files:
	test_grammar.py 
Log Message:
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.


Index: test_grammar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_grammar.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** test_grammar.py	2000/09/19 20:59:05	1.18
--- test_grammar.py	2000/10/11 21:26:03	1.19
***************
*** 269,276 ****
  print >> sys.stdout, 0 or 1
  
! # test print >> None
  class Gulp:
  	def write(self, msg): pass
  
  def driver():
  	oldstdout = sys.stdout
--- 269,284 ----
  print >> sys.stdout, 0 or 1
  
! # 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