/[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 1168 by jonathan, Thu Jun 12 12:42:50 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          self.assertEquals(writer.encode('&"\'<>'),  
88                            "&amp;&quot;&apos;&lt;&gt;")          eq(writer.encode("\x80\x90\xc2\x100"),
89          self.assertEquals(writer.encode(unicode('&"\'<>')),                           "\xc2\x80\xc2\x90\xc3\x82\x100")
90                            "&amp;&quot;&apos;&lt;&gt;")          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            eq(writer.encode('&"\'<>'), "&amp;&quot;&apos;&lt;&gt;")
95            eq(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.1168  
changed lines
  Added in v.1200

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26