All Downloads are FREE. Search and download functionalities are using the official Maven repository.

test.test__init__.py Maven / Gradle / Ivy

There is a newer version: 2.4
Show newest version
#! /usr/bin/env python
# .. coding: utf8
# $Id: test__init__.py 7337 2012-02-03 08:16:53Z milde $
# Author: Günter Milde 
# Copyright: This module has been placed in the public domain.

"""
Test module for the docutils' __init__.py.
"""

import unittest
import sys
import DocutilsTestSupport              # must be imported before docutils
import docutils

class ApplicationErrorTests(unittest.TestCase):

    def test_message(self):
        err = docutils.ApplicationError('the message')
        self.assertEqual(unicode(err), u'the message')

    def test_non_ASCII_message(self):
        err = docutils.ApplicationError(u'\u0169')
        self.assertEqual(unicode(err), u'\u0169')


if __name__ == '__main__':
    unittest.main()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy