/[thuban]/branches/WIP-pyshapelib-bramz/test/test_save.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/test_save.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1173 by jonathan, Thu Jun 12 13:37:18 2003 UTC revision 1200 by jonathan, Fri Jun 13 15:04:44 2003 UTC
# Line 80  class XMLWriterTest(unittest.TestCase): Line 80  class XMLWriterTest(unittest.TestCase):
80      def testEncode(self):      def testEncode(self):
81          """Test XMLWriter.encode"""          """Test XMLWriter.encode"""
82          writer = XMLWriter()          writer = XMLWriter()
83            eq = self.assertEquals
84    
85          writer.encode("hello world")          eq(writer.encode("hello world"), "hello world")
86          writer.encode(unicode("hello world"))          eq(writer.encode(unicode("hello world")), unicode("hello world"))
87    
88          writer.encode("\x80\x90\xc2\x100")          eq(writer.encode("\x80\x90\xc2\x100"),
89          writer.encode(u"\x80\x90\xc2\x100")                           "\xc2\x80\xc2\x90\xc3\x82\x100")
90          writer.encode(u"\xFF5E")          eq(writer.encode(u"\x80\x90\xc2\x100"),
91                             "\xc2\x80\xc2\x90\xc3\x82\x100")
92            eq(writer.encode(u"\xFF5E"), "\xc3\xbf5E")
93    
94          self.assertEquals(writer.encode('&"\'<>'),          eq(writer.encode('&"\'<>'), "&amp;&quot;&apos;&lt;&gt;")
95                            "&amp;&quot;&apos;&lt;&gt;")          eq(writer.encode(unicode('&"\'<>')), "&amp;&quot;&apos;&lt;&gt;")
         self.assertEquals(writer.encode(unicode('&"\'<>')),  
                           "&amp;&quot;&apos;&lt;&gt;")  
96    
97  class SaveSessionTest(unittest.TestCase, support.FileTestMixin):  class SaveSessionTest(unittest.TestCase, support.FileTestMixin):
98    

Legend:
Removed from v.1173  
changed lines
  Added in v.1200

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26