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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2672 - (show annotations)
Mon Oct 17 21:31:43 2005 UTC (19 years, 4 months ago) by bernhard
Original Path: trunk/thuban/test/test_stringrepresentation.py
File MIME type: text/x-python
File size: 717 byte(s)
* Thuban/__init__.py (set_internal_encoding): added a forwards
and backward translation, so that we fail early if the
internal_encoding is bad.

* test/test_stringrepresentation.py: New file, for now testing
that set_internal_coding() is throwing an exception for bad exceptions.

1 # Copyright (c) 2005 by Intevation GmbH
2 # Authors:
3 # Bernhard Reiter <[email protected]>
4 #
5 # This program is free software under the GPL (>=v2)
6 # Read the file COPYING coming with Thuban for details.
7
8 """
9 Test the functions for Thuban's string representation.
10 """
11
12 __version__ = "$Revision$"
13 # $Source$
14 # $Id$
15
16 import unittest
17
18 import support
19 support.initthuban()
20
21 import Thuban
22
23 class TestInternalEncoding(unittest.TestCase):
24 """Test around the thuban default encoding."""
25 def test_notice_bad_internalencoding(self):
26 bad_encoding="this-never-is-a-valid-encoding"
27 self.assertRaises(LookupError,
28 Thuban.set_internal_encoding,bad_encoding)
29
30 if __name__ == "__main__":
31 support.run_tests()

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26