view genshi/template/tests/__init__.py @ 934:31bbb6f9e87b trunk

Merge r1142 from py3k: add support for python 3 to genshi.template expression evaluator: * add support for python 3 AST: * AST for raise has changed in Python 3. * Python 3 adds AST nodes for individual arguments and Bytes. * use genshi.compat functions for dealing with code objects. * do not coerce byte strings to unicode in Python 3 ASTTransformer. * replace doctests that reply on exception names with uglier but more compatible try:.. except:.. doctest * handle filename preferences of Python 2 and 3 (2 prefers bytes, 3 prefers unicode). * ifilter is gone from itertools in Python 3 so use repeat for tests instead.
author hodgestar
date Fri, 18 Mar 2011 09:15:29 +0000
parents fd9c4f7a249a
children af57b12e3dd2 1fd97b75cdc9
line wrap: on
line source
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at http://genshi.edgewall.org/log/.

import doctest
import unittest

def suite():
    from genshi.template.tests import base, directives, eval, interpolation, \
                                      loader, markup, plugin, text
    suite = unittest.TestSuite()
    suite.addTest(base.suite())
    suite.addTest(directives.suite())
    suite.addTest(eval.suite())
    suite.addTest(interpolation.suite())
    suite.addTest(loader.suite())
    suite.addTest(markup.suite())
    suite.addTest(plugin.suite())
    suite.addTest(text.suite())
    return suite

if __name__ == '__main__':
    unittest.main(defaultTest='suite')
Copyright (C) 2012-2017 Edgewall Software