[Python-checkins] CVS: python/dist/src/Lib/test test_quopri.py,1.5,1.6

Martin v. L?wis loewis@users.sourceforge.net
Sun, 30 Sep 2001 13:32:13 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv10858/Lib/test

Modified Files:
	test_quopri.py 
Log Message:
Patch #462190, patch #464070: Support quoted printable in the binascii module.
Decode and encode underscores for header style encoding. Fixes bug #463996.


Index: test_quopri.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_quopri.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_quopri.py	2001/09/20 21:33:42	1.5
--- test_quopri.py	2001/09/30 20:32:10	1.6
***************
*** 105,108 ****
--- 105,114 ----
          )
  
+     # These are used in the "header=1" tests.
+     HSTRINGS = (
+         ('hello world', 'hello_world'),
+         ('hello_world', 'hello=5Fworld'),
+         )
+ 
      def test_encodestring(self):
          for p, e in self.STRINGS:
***************
*** 136,139 ****
--- 142,152 ----
              self.assert_(decodestring(e) == p)
  
+     def test_encode_header(self):
+         for p, e in self.HSTRINGS:
+             self.assert_(encodestring(p, header = 1) == e)
+ 
+     def test_decode_header(self):
+         for p, e in self.HSTRINGS:
+             self.assert_(decodestring(e, header = 1) == p)
  
  def test_main():