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

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

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

revision 2672 by bernhard, Mon Oct 17 21:31:43 2005 UTC revision 2673 by bernhard, Wed Oct 19 08:08:29 2005 UTC
# Line 22  import Thuban Line 22  import Thuban
22    
23  class TestInternalEncoding(unittest.TestCase):  class TestInternalEncoding(unittest.TestCase):
24      """Test around the thuban default encoding."""      """Test around the thuban default encoding."""
25    
26        def setUp(self):
27            """Save the old internal encoding, so we can restore it."""
28            self.saved_encoding=Thuban.get_internal_encoding()
29    
30        def tearDown(self):
31            """Restore saved internal encoding."""
32            Thuban.set_internal_encoding(self.saved_encoding)
33    
34      def test_notice_bad_internalencoding(self):      def test_notice_bad_internalencoding(self):
35          bad_encoding="this-never-is-a-valid-encoding"          bad_encoding="this-never-is-a-valid-encoding"
36          self.assertRaises(LookupError,          self.assertRaises(LookupError,
37                          Thuban.set_internal_encoding,bad_encoding)              Thuban.set_internal_encoding,bad_encoding)
38    
39  if __name__ == "__main__":  if __name__ == "__main__":
40      support.run_tests()      support.run_tests()

Legend:
Removed from v.2672  
changed lines
  Added in v.2673

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26