Edgewall Software

source: trunk/genshi/filters/tests/__init__.py

Last change on this file was 1158, checked in by hodgestar, 13 years ago

Merge r1141 from py3k:

add support for python 3 to genshi.filters:

  • minor changes to track encoding=None API change in core genshi modules.
  • renamed genshi/filters/tests/html.py to test_html.py to avoid clashes with Python 3 top-level html module when running tests subset.
  • did not rename genshi/filters/html.py.
  • i18n filters:
    • ugettext and friends are gone in Python 3 (and only gettext and friends exist and they now handle unicode)
    • Some \ line continuations inside doctests confused 2to3 and so were removed them.
    • Testing picked up a problem (already present in trunk) where Translator.call could end up defining gettext as an endlessly recursive function. Noted with a TODO.
  • Property svn:eol-style set to native
File size: 882 bytes
Line 
1# -*- coding: utf-8 -*-
2#
3# Copyright (C) 2007-2008 Edgewall Software
4# All rights reserved.
5#
6# This software is licensed as described in the file COPYING, which
7# you should have received as part of this distribution. The terms
8# are also available at http://genshi.edgewall.org/wiki/License.
9#
10# This software consists of voluntary contributions made by many
11# individuals. For the exact contribution history, see the revision
12# history and logs, available at http://genshi.edgewall.org/log/.
13
14import doctest
15import unittest
16
17def suite():
18    from genshi.filters.tests import test_html, i18n, transform
19    suite = unittest.TestSuite()
20    suite.addTest(test_html.suite())
21    suite.addTest(i18n.suite())
22    if hasattr(doctest, 'NORMALIZE_WHITESPACE'):
23        suite.addTest(transform.suite())
24    return suite
25
26if __name__ == '__main__':
27    unittest.main(defaultTest='suite')
Note: See TracBrowser for help on using the repository browser.