python类test_xml_etree()的实例源码

test_xml_etree.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def test_main(module_name='xml.etree.ElementTree'):
    from test import test_xml_etree

    use_py_module = (module_name == 'xml.etree.ElementTree')

    # The same doctests are used for both the Python and the C implementations
    assert test_xml_etree.ET.__name__ == module_name

    # XXX the C module should give the same warnings as the Python module
    with CleanContext(quiet=not use_py_module):
        support.run_doctest(test_xml_etree, verbosity=True)

    # The module should not be changed by the tests
    assert test_xml_etree.ET.__name__ == module_name
test_xml_etree.py 文件源码 项目:oil 作者: oilshell 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def test_main(module_name='xml.etree.ElementTree'):
    from test import test_xml_etree

    use_py_module = (module_name == 'xml.etree.ElementTree')

    # The same doctests are used for both the Python and the C implementations
    assert test_xml_etree.ET.__name__ == module_name

    # XXX the C module should give the same warnings as the Python module
    with CleanContext(quiet=not use_py_module):
        test_support.run_doctest(test_xml_etree, verbosity=True)

    # The module should not be changed by the tests
    assert test_xml_etree.ET.__name__ == module_name
test_xml_etree.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def test_main(module_name='xml.etree.ElementTree'):
    from test import test_xml_etree

    use_py_module = (module_name == 'xml.etree.ElementTree')

    # The same doctests are used for both the Python and the C implementations
    assert test_xml_etree.ET.__name__ == module_name

    # XXX the C module should give the same warnings as the Python module
    with CleanContext(quiet=not use_py_module):
        test_support.run_doctest(test_xml_etree, verbosity=True)

    # The module should not be changed by the tests
    assert test_xml_etree.ET.__name__ == module_name
test_xml_etree.py 文件源码 项目:pefile.pypy 作者: cloudtracer 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def test_main(module_name='xml.etree.ElementTree'):
    from test import test_xml_etree

    use_py_module = (module_name == 'xml.etree.ElementTree')

    # The same doctests are used for both the Python and the C implementations
    assert test_xml_etree.ET.__name__ == module_name

    # XXX the C module should give the same warnings as the Python module
    with CleanContext(quiet=not use_py_module):
        test_support.run_doctest(test_xml_etree, verbosity=True)

    # The module should not be changed by the tests
    assert test_xml_etree.ET.__name__ == module_name
test_xml_etree.py 文件源码 项目:ndk-python 作者: gittor 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def test_main(module_name='xml.etree.ElementTree'):
    from test import test_xml_etree

    use_py_module = (module_name == 'xml.etree.ElementTree')

    # The same doctests are used for both the Python and the C implementations
    assert test_xml_etree.ET.__name__ == module_name

    # XXX the C module should give the same warnings as the Python module
    with CleanContext(quiet=not use_py_module):
        test_support.run_doctest(test_xml_etree, verbosity=True)

    # The module should not be changed by the tests
    assert test_xml_etree.ET.__name__ == module_name


问题


面经


文章

微信
公众号

扫码关注公众号