annotate genshi/filters/tests/__init__.py @ 916:872726bac135 experimental-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.
author hodgestar
date Sun, 24 Oct 2010 22:21:28 +0000
parents 09a90feb9269
children
rev   line source
446
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
1 # -*- coding: utf-8 -*-
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
2 #
719
09a90feb9269 Fix copyright years.
cmlenz
parents: 709
diff changeset
3 # Copyright (C) 2007-2008 Edgewall Software
446
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
4 # All rights reserved.
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
5 #
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
6 # This software is licensed as described in the file COPYING, which
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
7 # you should have received as part of this distribution. The terms
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
8 # are also available at http://genshi.edgewall.org/wiki/License.
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
9 #
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
10 # This software consists of voluntary contributions made by many
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
11 # individuals. For the exact contribution history, see the revision
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
12 # history and logs, available at http://genshi.edgewall.org/log/.
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
13
709
a7b0d320aea4 Python 2.3 compatibility fixes for transformer and (specifically for 2.3.1) i18n.
athomas
parents: 593
diff changeset
14 import doctest
446
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
15 import unittest
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
16
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
17 def suite():
916
872726bac135 add support for python 3 to genshi.filters:
hodgestar
parents: 719
diff changeset
18 from genshi.filters.tests import test_html, i18n, transform
446
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
19 suite = unittest.TestSuite()
916
872726bac135 add support for python 3 to genshi.filters:
hodgestar
parents: 719
diff changeset
20 suite.addTest(test_html.suite())
446
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
21 suite.addTest(i18n.suite())
709
a7b0d320aea4 Python 2.3 compatibility fixes for transformer and (specifically for 2.3.1) i18n.
athomas
parents: 593
diff changeset
22 if hasattr(doctest, 'NORMALIZE_WHITESPACE'):
a7b0d320aea4 Python 2.3 compatibility fixes for transformer and (specifically for 2.3.1) i18n.
athomas
parents: 593
diff changeset
23 suite.addTest(transform.suite())
446
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
24 return suite
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
25
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
26 if __name__ == '__main__':
90f5908cd10a Add basic I18n/L10n functionality, based on GenshiRecipes/Localization.
cmlenz
parents:
diff changeset
27 unittest.main(defaultTest='suite')
Copyright (C) 2012-2017 Edgewall Software