bernhard: thuban/test test_stringrepresentation.py,NONE,1.1
cvs@intevation.de
cvs at intevation.de
Mon Oct 17 23:31:45 CEST 2005
Author: bernhard
Update of /thubanrepository/thuban/test
In directory doto:/tmp/cvs-serv30787/test
Added Files:
test_stringrepresentation.py
Log Message:
* 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.
--- NEW FILE: test_stringrepresentation.py ---
# Copyright (c) 2005 by Intevation GmbH
# Authors:
# Bernhard Reiter <bernhard at intevation.de>
#
# This program is free software under the GPL (>=v2)
# Read the file COPYING coming with Thuban for details.
"""
Test the functions for Thuban's string representation.
"""
__version__ = "$Revision: 1.1 $"
# $Source: /thubanrepository/thuban/test/test_stringrepresentation.py,v $
# $Id: test_stringrepresentation.py,v 1.1 2005/10/17 21:31:43 bernhard Exp $
import unittest
import support
support.initthuban()
import Thuban
class TestInternalEncoding(unittest.TestCase):
"""Test around the thuban default encoding."""
def test_notice_bad_internalencoding(self):
bad_encoding="this-never-is-a-valid-encoding"
self.assertRaises(LookupError,
Thuban.set_internal_encoding,bad_encoding)
if __name__ == "__main__":
support.run_tests()
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)