starting phase `set-SOURCE-DATE-EPOCH' phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds starting phase `set-paths' environment variable `PATH' set to `/gnu/store/j3cx0yaqdpw0mxizp5bayx93pya44dhn-python-wrapper-3.9.9/bin:/gnu/store/g2ajyl8xk9aarxrgjbng2hkj3qm2v0z2-tar-1.34/bin:/gnu/store/iixwcv3k49ks1rf34pjgfzmzyhhgwng3-gzip-1.10/bin:/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/bin:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/bin:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/bin:/gnu/store/ahmmvw21p11ik80lg1f953y7fd8bqkjm-diffutils-3.8/bin:/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-patch-2.7.6/bin:/gnu/store/39rsx3nl4c31952jybbjb8d6idr5hx7r-findutils-4.8.0/bin:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/bin:/gnu/store/wxgv6i8g0p24q5gcyzd0yr07s8kn9680-sed-4.8/bin:/gnu/store/xjwp2hsd9256icjjybfrmznppjicywf6-grep-3.6/bin:/gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32/bin:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/bin:/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin:/gnu/store/s2pg5k98fl2g2szg9dykxyd9zl3xihv9-ld-wrapper-0/bin:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/bin:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/sbin:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/bin' environment variable `GUIX_PYTHONPATH' set to `/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages' environment variable `PYTHONTZPATH' unset environment variable `BASH_LOADABLES_PATH' unset environment variable `C_INCLUDE_PATH' set to `/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/include:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux-libre-headers-5.10.35/include' environment variable `CPLUS_INCLUDE_PATH' set to `/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/include:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux-libre-headers-5.10.35/include' environment variable `LIBRARY_PATH' set to `/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/lib:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/lib:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/lib:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/lib:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/lib:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib:/gnu/store/4jdghmc65q7i7ib89zmvq66l0ghf7jc4-glibc-2.33-static/lib:/gnu/store/fnr1z6xsan0437r0yg48d0y8k32kqxby-glibc-utf8-locales-2.33/lib:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib' environment variable `GUIX_LOCPATH' set to `/gnu/store/fnr1z6xsan0437r0yg48d0y8k32kqxby-glibc-utf8-locales-2.33/lib/locale' phase `set-paths' succeeded after 0.0 seconds starting phase `install-locale' using 'en_US.utf8' locale for category "LC_ALL" phase `install-locale' succeeded after 0.0 seconds starting phase `unpack' nose-1.3.7/ nose-1.3.7/AUTHORS nose-1.3.7/bin/ nose-1.3.7/bin/nosetests nose-1.3.7/CHANGELOG nose-1.3.7/distribute_setup.py nose-1.3.7/doc/ nose-1.3.7/doc/.static/ nose-1.3.7/doc/.static/nose.css nose-1.3.7/doc/.templates/ nose-1.3.7/doc/.templates/index.html nose-1.3.7/doc/.templates/indexsidebar.html nose-1.3.7/doc/.templates/layout.html nose-1.3.7/doc/.templates/page.html nose-1.3.7/doc/api/ nose-1.3.7/doc/api/commands.rst nose-1.3.7/doc/api/config.rst nose-1.3.7/doc/api/core.rst nose-1.3.7/doc/api/importer.rst nose-1.3.7/doc/api/inspector.rst nose-1.3.7/doc/api/loader.rst nose-1.3.7/doc/api/plugin_manager.rst nose-1.3.7/doc/api/proxy.rst nose-1.3.7/doc/api/result.rst nose-1.3.7/doc/api/selector.rst nose-1.3.7/doc/api/suite.rst nose-1.3.7/doc/api/test_cases.rst nose-1.3.7/doc/api/twistedtools.rst nose-1.3.7/doc/api/util.rst nose-1.3.7/doc/api.rst nose-1.3.7/doc/conf.py nose-1.3.7/doc/contributing.rst nose-1.3.7/doc/developing.rst nose-1.3.7/doc/docstring.py nose-1.3.7/doc/finding_tests.rst nose-1.3.7/doc/further_reading.rst nose-1.3.7/doc/index.html nose-1.3.7/doc/index.rst nose-1.3.7/doc/Makefile nose-1.3.7/doc/man.rst nose-1.3.7/doc/more_info.rst nose-1.3.7/doc/news.rst nose-1.3.7/doc/plugins/ nose-1.3.7/doc/plugins/allmodules.rst nose-1.3.7/doc/plugins/attrib.rst nose-1.3.7/doc/plugins/builtin.rst nose-1.3.7/doc/plugins/capture.rst nose-1.3.7/doc/plugins/collect.rst nose-1.3.7/doc/plugins/cover.rst nose-1.3.7/doc/plugins/debug.rst nose-1.3.7/doc/plugins/deprecated.rst nose-1.3.7/doc/plugins/doctests.rst nose-1.3.7/doc/plugins/documenting.rst nose-1.3.7/doc/plugins/errorclasses.rst nose-1.3.7/doc/plugins/failuredetail.rst nose-1.3.7/doc/plugins/interface.rst nose-1.3.7/doc/plugins/isolate.rst nose-1.3.7/doc/plugins/logcapture.rst nose-1.3.7/doc/plugins/multiprocess.rst nose-1.3.7/doc/plugins/other.rst nose-1.3.7/doc/plugins/prof.rst nose-1.3.7/doc/plugins/skip.rst nose-1.3.7/doc/plugins/testid.rst nose-1.3.7/doc/plugins/testing.rst nose-1.3.7/doc/plugins/writing.rst nose-1.3.7/doc/plugins/xunit.rst nose-1.3.7/doc/plugins.rst nose-1.3.7/doc/rtd-requirements.txt nose-1.3.7/doc/setuptools_integration.rst nose-1.3.7/doc/testing.rst nose-1.3.7/doc/testing_tools.rst nose-1.3.7/doc/usage.rst nose-1.3.7/doc/writing_tests.rst nose-1.3.7/examples/ nose-1.3.7/examples/attrib_plugin.py nose-1.3.7/examples/html_plugin/ nose-1.3.7/examples/html_plugin/htmlplug.py nose-1.3.7/examples/html_plugin/setup.py nose-1.3.7/examples/plugin/ nose-1.3.7/examples/plugin/plug.py nose-1.3.7/examples/plugin/setup.py nose-1.3.7/functional_tests/ nose-1.3.7/functional_tests/doc_tests/ nose-1.3.7/functional_tests/doc_tests/test_addplugins/ nose-1.3.7/functional_tests/doc_tests/test_addplugins/support/ nose-1.3.7/functional_tests/doc_tests/test_addplugins/support/test.py nose-1.3.7/functional_tests/doc_tests/test_addplugins/test_addplugins.rst nose-1.3.7/functional_tests/doc_tests/test_allmodules/ nose-1.3.7/functional_tests/doc_tests/test_allmodules/support/ nose-1.3.7/functional_tests/doc_tests/test_allmodules/support/mod.py nose-1.3.7/functional_tests/doc_tests/test_allmodules/support/test.py nose-1.3.7/functional_tests/doc_tests/test_allmodules/test_allmodules.rst nose-1.3.7/functional_tests/doc_tests/test_doctest_fixtures/ nose-1.3.7/functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures.rst nose-1.3.7/functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures_fixtures.py nose-1.3.7/functional_tests/doc_tests/test_init_plugin/ nose-1.3.7/functional_tests/doc_tests/test_init_plugin/example.cfg nose-1.3.7/functional_tests/doc_tests/test_init_plugin/init_plugin.rst nose-1.3.7/functional_tests/doc_tests/test_init_plugin/init_plugin.rst.py3.patch nose-1.3.7/functional_tests/doc_tests/test_issue089/ nose-1.3.7/functional_tests/doc_tests/test_issue089/support/ nose-1.3.7/functional_tests/doc_tests/test_issue089/support/unwanted_package/ nose-1.3.7/functional_tests/doc_tests/test_issue089/support/unwanted_package/__init__.py nose-1.3.7/functional_tests/doc_tests/test_issue089/support/unwanted_package/test_spam.py nose-1.3.7/functional_tests/doc_tests/test_issue089/support/wanted_package/ nose-1.3.7/functional_tests/doc_tests/test_issue089/support/wanted_package/__init__.py nose-1.3.7/functional_tests/doc_tests/test_issue089/support/wanted_package/test_eggs.py nose-1.3.7/functional_tests/doc_tests/test_issue089/unwanted_package.rst nose-1.3.7/functional_tests/doc_tests/test_issue097/ nose-1.3.7/functional_tests/doc_tests/test_issue097/plugintest_environment.rst nose-1.3.7/functional_tests/doc_tests/test_issue107/ nose-1.3.7/functional_tests/doc_tests/test_issue107/plugin_exceptions.rst nose-1.3.7/functional_tests/doc_tests/test_issue107/support/ nose-1.3.7/functional_tests/doc_tests/test_issue107/support/test_spam.py nose-1.3.7/functional_tests/doc_tests/test_issue119/ nose-1.3.7/functional_tests/doc_tests/test_issue119/empty_plugin.rst nose-1.3.7/functional_tests/doc_tests/test_issue119/test_zeronine.py nose-1.3.7/functional_tests/doc_tests/test_issue142/ nose-1.3.7/functional_tests/doc_tests/test_issue142/errorclass_failure.rst nose-1.3.7/functional_tests/doc_tests/test_issue142/support/ nose-1.3.7/functional_tests/doc_tests/test_issue142/support/errorclass_failing_test.py nose-1.3.7/functional_tests/doc_tests/test_issue142/support/errorclass_failure_plugin.py nose-1.3.7/functional_tests/doc_tests/test_issue142/support/errorclass_tests.py nose-1.3.7/functional_tests/doc_tests/test_issue145/ nose-1.3.7/functional_tests/doc_tests/test_issue145/imported_tests.rst nose-1.3.7/functional_tests/doc_tests/test_issue145/support/ nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package1/ nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package1/__init__.py nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package1/test_module.py nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package2c/ nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package2c/__init__.py nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package2c/test_module.py nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package2f/ nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package2f/__init__.py nose-1.3.7/functional_tests/doc_tests/test_issue145/support/package2f/test_module.py nose-1.3.7/functional_tests/doc_tests/test_multiprocess/ nose-1.3.7/functional_tests/doc_tests/test_multiprocess/multiprocess.rst nose-1.3.7/functional_tests/doc_tests/test_multiprocess/multiprocess_fixtures.py nose-1.3.7/functional_tests/doc_tests/test_multiprocess/support/ nose-1.3.7/functional_tests/doc_tests/test_multiprocess/support/test_can_split.py nose-1.3.7/functional_tests/doc_tests/test_multiprocess/support/test_not_shared.py nose-1.3.7/functional_tests/doc_tests/test_multiprocess/support/test_shared.py nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/ nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/restricted_plugin_options.rst nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/restricted_plugin_options.rst.py3.patch nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/support/ nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/support/bad.cfg nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/support/start.cfg nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/support/test.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/selector_plugin.rst nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/mymodule.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/mypackage/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/mypackage/__init__.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/__init__.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/basic.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/mypackage/strings.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/math/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/mymodule/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/mymodule/my_function.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/strings/ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/support/tests/testlib.py nose-1.3.7/functional_tests/doc_tests/test_xunit_plugin/ nose-1.3.7/functional_tests/doc_tests/test_xunit_plugin/support/ nose-1.3.7/functional_tests/doc_tests/test_xunit_plugin/support/nosetests.xml nose-1.3.7/functional_tests/doc_tests/test_xunit_plugin/support/test_skip.py nose-1.3.7/functional_tests/doc_tests/test_xunit_plugin/test_skips.rst nose-1.3.7/functional_tests/nosetests.xml nose-1.3.7/functional_tests/support/ nose-1.3.7/functional_tests/support/att/ nose-1.3.7/functional_tests/support/att/test_attr.py nose-1.3.7/functional_tests/support/attrib-static/ nose-1.3.7/functional_tests/support/attrib-static/test.py nose-1.3.7/functional_tests/support/coverage/ nose-1.3.7/functional_tests/support/coverage/blah.py nose-1.3.7/functional_tests/support/coverage/tests/ nose-1.3.7/functional_tests/support/coverage/tests/test_covered.py nose-1.3.7/functional_tests/support/coverage2/ nose-1.3.7/functional_tests/support/coverage2/.coverage nose-1.3.7/functional_tests/support/coverage2/blah.py nose-1.3.7/functional_tests/support/coverage2/moo.py nose-1.3.7/functional_tests/support/coverage2/tests/ nose-1.3.7/functional_tests/support/coverage2/tests/test_covered.py nose-1.3.7/functional_tests/support/ctx/ nose-1.3.7/functional_tests/support/ctx/mod_import_skip.py nose-1.3.7/functional_tests/support/ctx/mod_setup_fails.py nose-1.3.7/functional_tests/support/ctx/mod_setup_skip.py nose-1.3.7/functional_tests/support/dir1/ nose-1.3.7/functional_tests/support/dir1/mod.py nose-1.3.7/functional_tests/support/dir1/pak/ nose-1.3.7/functional_tests/support/dir1/pak/__init__.py nose-1.3.7/functional_tests/support/dir1/pak/mod.py nose-1.3.7/functional_tests/support/dir1/pak/sub/ nose-1.3.7/functional_tests/support/dir1/pak/sub/__init__.py nose-1.3.7/functional_tests/support/dir2/ nose-1.3.7/functional_tests/support/dir2/mod.py nose-1.3.7/functional_tests/support/dir2/pak/ nose-1.3.7/functional_tests/support/dir2/pak/__init__.py nose-1.3.7/functional_tests/support/dir2/pak/mod.py nose-1.3.7/functional_tests/support/dir2/pak/sub/ nose-1.3.7/functional_tests/support/dir2/pak/sub/__init__.py nose-1.3.7/functional_tests/support/dir3/ nose-1.3.7/functional_tests/support/dir3/.hidden nose-1.3.7/functional_tests/support/dtt/ nose-1.3.7/functional_tests/support/dtt/docs/ nose-1.3.7/functional_tests/support/dtt/docs/doc.txt nose-1.3.7/functional_tests/support/dtt/docs/errdoc.txt nose-1.3.7/functional_tests/support/dtt/docs/nodoc.txt nose-1.3.7/functional_tests/support/dtt/some_mod.py nose-1.3.7/functional_tests/support/empty/ nose-1.3.7/functional_tests/support/empty/.hidden nose-1.3.7/functional_tests/support/ep/ nose-1.3.7/functional_tests/support/ep/setup.py nose-1.3.7/functional_tests/support/ep/Some_plugin.egg-info/ nose-1.3.7/functional_tests/support/ep/Some_plugin.egg-info/dependency_links.txt nose-1.3.7/functional_tests/support/ep/Some_plugin.egg-info/entry_points.txt nose-1.3.7/functional_tests/support/ep/Some_plugin.egg-info/PKG-INFO nose-1.3.7/functional_tests/support/ep/Some_plugin.egg-info/SOURCES.txt nose-1.3.7/functional_tests/support/ep/Some_plugin.egg-info/top_level.txt nose-1.3.7/functional_tests/support/ep/someplugin.py nose-1.3.7/functional_tests/support/fdp/ nose-1.3.7/functional_tests/support/fdp/test_fdp.py nose-1.3.7/functional_tests/support/fdp/test_fdp_no_capt.py nose-1.3.7/functional_tests/support/gen/ nose-1.3.7/functional_tests/support/gen/test.py nose-1.3.7/functional_tests/support/id_fails/ nose-1.3.7/functional_tests/support/id_fails/test_a.py nose-1.3.7/functional_tests/support/id_fails/test_b.py nose-1.3.7/functional_tests/support/idp/ nose-1.3.7/functional_tests/support/idp/exm.py nose-1.3.7/functional_tests/support/idp/tests.py nose-1.3.7/functional_tests/support/ipt/ nose-1.3.7/functional_tests/support/ipt/test1/ nose-1.3.7/functional_tests/support/ipt/test1/ipthelp.py nose-1.3.7/functional_tests/support/ipt/test1/tests.py nose-1.3.7/functional_tests/support/ipt/test2/ nose-1.3.7/functional_tests/support/ipt/test2/ipthelp.py nose-1.3.7/functional_tests/support/ipt/test2/tests.py nose-1.3.7/functional_tests/support/issue038/ nose-1.3.7/functional_tests/support/issue038/test.py nose-1.3.7/functional_tests/support/issue072/ nose-1.3.7/functional_tests/support/issue072/test.py nose-1.3.7/functional_tests/support/issue082/ nose-1.3.7/functional_tests/support/issue082/_mypackage/ nose-1.3.7/functional_tests/support/issue082/_mypackage/__init__.py nose-1.3.7/functional_tests/support/issue082/_mypackage/_eggs.py nose-1.3.7/functional_tests/support/issue082/_mypackage/bacon.py nose-1.3.7/functional_tests/support/issue082/mypublicpackage/ nose-1.3.7/functional_tests/support/issue082/mypublicpackage/__init__.py nose-1.3.7/functional_tests/support/issue082/mypublicpackage/_foo.py nose-1.3.7/functional_tests/support/issue082/mypublicpackage/bar.py nose-1.3.7/functional_tests/support/issue130/ nose-1.3.7/functional_tests/support/issue130/test.py nose-1.3.7/functional_tests/support/issue134/ nose-1.3.7/functional_tests/support/issue134/test.py nose-1.3.7/functional_tests/support/issue143/ nose-1.3.7/functional_tests/support/issue143/not-a-package/ nose-1.3.7/functional_tests/support/issue143/not-a-package/__init__.py nose-1.3.7/functional_tests/support/issue143/not-a-package/test.py nose-1.3.7/functional_tests/support/issue191/ nose-1.3.7/functional_tests/support/issue191/setup.cfg nose-1.3.7/functional_tests/support/issue191/setup.py nose-1.3.7/functional_tests/support/issue191/test.py nose-1.3.7/functional_tests/support/issue191/UNKNOWN.egg-info/ nose-1.3.7/functional_tests/support/issue191/UNKNOWN.egg-info/dependency_links.txt nose-1.3.7/functional_tests/support/issue191/UNKNOWN.egg-info/PKG-INFO nose-1.3.7/functional_tests/support/issue191/UNKNOWN.egg-info/SOURCES.txt nose-1.3.7/functional_tests/support/issue191/UNKNOWN.egg-info/top_level.txt nose-1.3.7/functional_tests/support/issue269/ nose-1.3.7/functional_tests/support/issue269/test_bad_class.py nose-1.3.7/functional_tests/support/issue279/ nose-1.3.7/functional_tests/support/issue279/test_mod_setup_fails.py nose-1.3.7/functional_tests/support/issue408/ nose-1.3.7/functional_tests/support/issue408/nosetests.xml nose-1.3.7/functional_tests/support/issue408/test.py nose-1.3.7/functional_tests/support/issue513/ nose-1.3.7/functional_tests/support/issue513/test.py nose-1.3.7/functional_tests/support/issue649/ nose-1.3.7/functional_tests/support/issue649/test.py nose-1.3.7/functional_tests/support/issue680/ nose-1.3.7/functional_tests/support/issue680/test.py nose-1.3.7/functional_tests/support/issue700/ nose-1.3.7/functional_tests/support/issue700/test.py nose-1.3.7/functional_tests/support/issue720/ nose-1.3.7/functional_tests/support/issue720/test.py nose-1.3.7/functional_tests/support/issue771/ nose-1.3.7/functional_tests/support/issue771/test.py nose-1.3.7/functional_tests/support/issue859/ nose-1.3.7/functional_tests/support/issue859/test.py nose-1.3.7/functional_tests/support/ltfn/ nose-1.3.7/functional_tests/support/ltfn/state.py nose-1.3.7/functional_tests/support/ltfn/test_mod.py nose-1.3.7/functional_tests/support/ltfn/test_pak1/ nose-1.3.7/functional_tests/support/ltfn/test_pak1/__init__.py nose-1.3.7/functional_tests/support/ltfn/test_pak1/test_mod.py nose-1.3.7/functional_tests/support/ltfn/test_pak2/ nose-1.3.7/functional_tests/support/ltfn/test_pak2/__init__.py nose-1.3.7/functional_tests/support/ltftc/ nose-1.3.7/functional_tests/support/ltftc/tests.py nose-1.3.7/functional_tests/support/namespace_pkg/ nose-1.3.7/functional_tests/support/namespace_pkg/namespace_pkg/ nose-1.3.7/functional_tests/support/namespace_pkg/namespace_pkg/__init__.py nose-1.3.7/functional_tests/support/namespace_pkg/namespace_pkg/example.py nose-1.3.7/functional_tests/support/namespace_pkg/namespace_pkg/test_pkg.py nose-1.3.7/functional_tests/support/namespace_pkg/site-packages/ nose-1.3.7/functional_tests/support/namespace_pkg/site-packages/namespace_pkg/ nose-1.3.7/functional_tests/support/namespace_pkg/site-packages/namespace_pkg/__init__.py nose-1.3.7/functional_tests/support/namespace_pkg/site-packages/namespace_pkg/example2.py nose-1.3.7/functional_tests/support/namespace_pkg/site-packages/namespace_pkg/test_pkg2.py nose-1.3.7/functional_tests/support/package1/ nose-1.3.7/functional_tests/support/package1/example.py nose-1.3.7/functional_tests/support/package1/tests/ nose-1.3.7/functional_tests/support/package1/tests/test_example_function.py nose-1.3.7/functional_tests/support/package2/ nose-1.3.7/functional_tests/support/package2/maths.py nose-1.3.7/functional_tests/support/package2/test_pak/ nose-1.3.7/functional_tests/support/package2/test_pak/__init__.py nose-1.3.7/functional_tests/support/package2/test_pak/test_mod.py nose-1.3.7/functional_tests/support/package2/test_pak/test_sub/ nose-1.3.7/functional_tests/support/package2/test_pak/test_sub/__init__.py nose-1.3.7/functional_tests/support/package2/test_pak/test_sub/test_mod.py nose-1.3.7/functional_tests/support/package3/ nose-1.3.7/functional_tests/support/package3/lib/ nose-1.3.7/functional_tests/support/package3/lib/a.py nose-1.3.7/functional_tests/support/package3/src/ nose-1.3.7/functional_tests/support/package3/src/b.py nose-1.3.7/functional_tests/support/package3/tests/ nose-1.3.7/functional_tests/support/package3/tests/test_a.py nose-1.3.7/functional_tests/support/package3/tests/test_b.py nose-1.3.7/functional_tests/support/pass/ nose-1.3.7/functional_tests/support/pass/test.py nose-1.3.7/functional_tests/support/string-exception/ nose-1.3.7/functional_tests/support/string-exception/test.py nose-1.3.7/functional_tests/support/test.cfg nose-1.3.7/functional_tests/support/test_buggy_generators.py nose-1.3.7/functional_tests/support/todo/ nose-1.3.7/functional_tests/support/todo/test_with_todo.py nose-1.3.7/functional_tests/support/todo/todoplug.py nose-1.3.7/functional_tests/support/twist/ nose-1.3.7/functional_tests/support/twist/test_twisted.py nose-1.3.7/functional_tests/support/xunit/ nose-1.3.7/functional_tests/support/xunit/test_xunit_as_suite.py nose-1.3.7/functional_tests/support/xunit.xml nose-1.3.7/functional_tests/test_attribute_plugin.py nose-1.3.7/functional_tests/test_buggy_generators.py nose-1.3.7/functional_tests/test_cases.py nose-1.3.7/functional_tests/test_collector.py nose-1.3.7/functional_tests/test_commands.py nose-1.3.7/functional_tests/test_config_files.py nose-1.3.7/functional_tests/test_coverage_plugin.py nose-1.3.7/functional_tests/test_defaultpluginmanager.py nose-1.3.7/functional_tests/test_doctest_plugin.py nose-1.3.7/functional_tests/test_entrypoints.py nose-1.3.7/functional_tests/test_failure.py nose-1.3.7/functional_tests/test_failuredetail_plugin.py nose-1.3.7/functional_tests/test_generator_fixtures.py nose-1.3.7/functional_tests/test_id_plugin.py nose-1.3.7/functional_tests/test_importer.py nose-1.3.7/functional_tests/test_isolate_plugin.py nose-1.3.7/functional_tests/test_issue120/ nose-1.3.7/functional_tests/test_issue120/support/ nose-1.3.7/functional_tests/test_issue120/support/some_test.py nose-1.3.7/functional_tests/test_issue120/test_named_test_with_doctest.rst nose-1.3.7/functional_tests/test_issue_072.py nose-1.3.7/functional_tests/test_issue_082.py nose-1.3.7/functional_tests/test_issue_408.py nose-1.3.7/functional_tests/test_issue_649.py nose-1.3.7/functional_tests/test_load_tests_from_test_case.py nose-1.3.7/functional_tests/test_loader.py nose-1.3.7/functional_tests/test_multiprocessing/ nose-1.3.7/functional_tests/test_multiprocessing/__init__.py nose-1.3.7/functional_tests/test_multiprocessing/support/ nose-1.3.7/functional_tests/test_multiprocessing/support/class.py nose-1.3.7/functional_tests/test_multiprocessing/support/concurrent_shared/ nose-1.3.7/functional_tests/test_multiprocessing/support/concurrent_shared/__init__.py nose-1.3.7/functional_tests/test_multiprocessing/support/concurrent_shared/test.py nose-1.3.7/functional_tests/test_multiprocessing/support/fake_nosetest.py nose-1.3.7/functional_tests/test_multiprocessing/support/keyboardinterrupt.py nose-1.3.7/functional_tests/test_multiprocessing/support/keyboardinterrupt_twice.py nose-1.3.7/functional_tests/test_multiprocessing/support/nameerror.py nose-1.3.7/functional_tests/test_multiprocessing/support/timeout.py nose-1.3.7/functional_tests/test_multiprocessing/test_class.py nose-1.3.7/functional_tests/test_multiprocessing/test_concurrent_shared.py nose-1.3.7/functional_tests/test_multiprocessing/test_keyboardinterrupt.py nose-1.3.7/functional_tests/test_multiprocessing/test_nameerror.py nose-1.3.7/functional_tests/test_multiprocessing/test_process_timeout.py nose-1.3.7/functional_tests/test_namespace_pkg.py nose-1.3.7/functional_tests/test_plugin_api.py nose-1.3.7/functional_tests/test_plugins.py nose-1.3.7/functional_tests/test_plugintest.py nose-1.3.7/functional_tests/test_program.py nose-1.3.7/functional_tests/test_result.py nose-1.3.7/functional_tests/test_selector.py nose-1.3.7/functional_tests/test_skip_pdb_interaction.py nose-1.3.7/functional_tests/test_string_exception.py nose-1.3.7/functional_tests/test_success.py nose-1.3.7/functional_tests/test_suite.py nose-1.3.7/functional_tests/test_withid_failures.rst nose-1.3.7/functional_tests/test_xunit.py nose-1.3.7/install-rpm.sh nose-1.3.7/lgpl.txt nose-1.3.7/MANIFEST.in nose-1.3.7/NEWS nose-1.3.7/nose/ nose-1.3.7/nose/__init__.py nose-1.3.7/nose/__main__.py nose-1.3.7/nose/case.py nose-1.3.7/nose/commands.py nose-1.3.7/nose/config.py nose-1.3.7/nose/core.py nose-1.3.7/nose/exc.py nose-1.3.7/nose/ext/ nose-1.3.7/nose/ext/__init__.py nose-1.3.7/nose/ext/dtcompat.py nose-1.3.7/nose/failure.py nose-1.3.7/nose/importer.py nose-1.3.7/nose/inspector.py nose-1.3.7/nose/loader.py nose-1.3.7/nose/plugins/ nose-1.3.7/nose/plugins/__init__.py nose-1.3.7/nose/plugins/allmodules.py nose-1.3.7/nose/plugins/attrib.py nose-1.3.7/nose/plugins/base.py nose-1.3.7/nose/plugins/builtin.py nose-1.3.7/nose/plugins/capture.py nose-1.3.7/nose/plugins/collect.py nose-1.3.7/nose/plugins/cover.py nose-1.3.7/nose/plugins/debug.py nose-1.3.7/nose/plugins/deprecated.py nose-1.3.7/nose/plugins/doctests.py nose-1.3.7/nose/plugins/errorclass.py nose-1.3.7/nose/plugins/failuredetail.py nose-1.3.7/nose/plugins/isolate.py nose-1.3.7/nose/plugins/logcapture.py nose-1.3.7/nose/plugins/manager.py nose-1.3.7/nose/plugins/multiprocess.py nose-1.3.7/nose/plugins/plugintest.py nose-1.3.7/nose/plugins/prof.py nose-1.3.7/nose/plugins/skip.py nose-1.3.7/nose/plugins/testid.py nose-1.3.7/nose/plugins/xunit.py nose-1.3.7/nose/proxy.py nose-1.3.7/nose/pyversion.py nose-1.3.7/nose/result.py nose-1.3.7/nose/selector.py nose-1.3.7/nose/sphinx/ nose-1.3.7/nose/sphinx/__init__.py nose-1.3.7/nose/sphinx/pluginopts.py nose-1.3.7/nose/suite.py nose-1.3.7/nose/tools/ nose-1.3.7/nose/tools/__init__.py nose-1.3.7/nose/tools/nontrivial.py nose-1.3.7/nose/tools/trivial.py nose-1.3.7/nose/twistedtools.py nose-1.3.7/nose/usage.txt nose-1.3.7/nose/util.py nose-1.3.7/nose.egg-info/ nose-1.3.7/nose.egg-info/dependency_links.txt nose-1.3.7/nose.egg-info/entry_points.txt nose-1.3.7/nose.egg-info/not-zip-safe nose-1.3.7/nose.egg-info/PKG-INFO nose-1.3.7/nose.egg-info/SOURCES.txt nose-1.3.7/nose.egg-info/top_level.txt nose-1.3.7/nosetests.1 nose-1.3.7/patch.py nose-1.3.7/PKG-INFO nose-1.3.7/README.txt nose-1.3.7/selftest.py nose-1.3.7/setup.cfg nose-1.3.7/setup.py nose-1.3.7/setup3lib.py nose-1.3.7/unit_tests/ nose-1.3.7/unit_tests/helpers.py nose-1.3.7/unit_tests/mock.py nose-1.3.7/unit_tests/support/ nose-1.3.7/unit_tests/support/bug101/ nose-1.3.7/unit_tests/support/bug101/tests.py nose-1.3.7/unit_tests/support/bug105/ nose-1.3.7/unit_tests/support/bug105/tests.py nose-1.3.7/unit_tests/support/config_defaults/ nose-1.3.7/unit_tests/support/config_defaults/a.cfg nose-1.3.7/unit_tests/support/config_defaults/b.cfg nose-1.3.7/unit_tests/support/config_defaults/invalid.cfg nose-1.3.7/unit_tests/support/config_defaults/invalid_value.cfg nose-1.3.7/unit_tests/support/doctest/ nose-1.3.7/unit_tests/support/doctest/.gitignore nose-1.3.7/unit_tests/support/doctest/err_doctests.py nose-1.3.7/unit_tests/support/doctest/no_doctests.py nose-1.3.7/unit_tests/support/doctest/noname_wrapped.not_py nose-1.3.7/unit_tests/support/doctest/noname_wrapped.not_pyc nose-1.3.7/unit_tests/support/doctest/noname_wrapper.py nose-1.3.7/unit_tests/support/foo/ nose-1.3.7/unit_tests/support/foo/__init__.py nose-1.3.7/unit_tests/support/foo/bar/ nose-1.3.7/unit_tests/support/foo/bar/__init__.py nose-1.3.7/unit_tests/support/foo/bar/buz.py nose-1.3.7/unit_tests/support/foo/doctests.txt nose-1.3.7/unit_tests/support/foo/test_foo.py nose-1.3.7/unit_tests/support/foo/tests/ nose-1.3.7/unit_tests/support/foo/tests/dir_test_file.py nose-1.3.7/unit_tests/support/init_prefix_bug/ nose-1.3.7/unit_tests/support/init_prefix_bug/__init__.py nose-1.3.7/unit_tests/support/init_prefix_bug/__init__not.py nose-1.3.7/unit_tests/support/issue006/ nose-1.3.7/unit_tests/support/issue006/tests.py nose-1.3.7/unit_tests/support/issue065/ nose-1.3.7/unit_tests/support/issue065/tests.py nose-1.3.7/unit_tests/support/issue135/ nose-1.3.7/unit_tests/support/issue135/tests.py nose-1.3.7/unit_tests/support/issue270/ nose-1.3.7/unit_tests/support/issue270/__init__.py nose-1.3.7/unit_tests/support/issue270/foo_test.py nose-1.3.7/unit_tests/support/other/ nose-1.3.7/unit_tests/support/other/file.txt nose-1.3.7/unit_tests/support/pkgorg/ nose-1.3.7/unit_tests/support/pkgorg/lib/ nose-1.3.7/unit_tests/support/pkgorg/lib/modernity.py nose-1.3.7/unit_tests/support/pkgorg/tests/ nose-1.3.7/unit_tests/support/pkgorg/tests/test_mod.py nose-1.3.7/unit_tests/support/script.py nose-1.3.7/unit_tests/support/test-dir/ nose-1.3.7/unit_tests/support/test-dir/test.py nose-1.3.7/unit_tests/support/test.py nose-1.3.7/unit_tests/test_attribute_plugin.py nose-1.3.7/unit_tests/test_bug105.py nose-1.3.7/unit_tests/test_capture_plugin.py nose-1.3.7/unit_tests/test_cases.py nose-1.3.7/unit_tests/test_config.py nose-1.3.7/unit_tests/test_config_defaults.rst nose-1.3.7/unit_tests/test_core.py nose-1.3.7/unit_tests/test_cover_plugin.py nose-1.3.7/unit_tests/test_deprecated_plugin.py nose-1.3.7/unit_tests/test_doctest_error_handling.py nose-1.3.7/unit_tests/test_doctest_munging.rst nose-1.3.7/unit_tests/test_doctest_no_name.py nose-1.3.7/unit_tests/test_id_plugin.py nose-1.3.7/unit_tests/test_importer.py nose-1.3.7/unit_tests/test_inspector.py nose-1.3.7/unit_tests/test_isolation_plugin.py nose-1.3.7/unit_tests/test_issue135.py nose-1.3.7/unit_tests/test_issue155.rst nose-1.3.7/unit_tests/test_issue270.rst nose-1.3.7/unit_tests/test_issue270_fixtures.py nose-1.3.7/unit_tests/test_issue_006.py nose-1.3.7/unit_tests/test_issue_064.py nose-1.3.7/unit_tests/test_issue_065.py nose-1.3.7/unit_tests/test_issue_100.rst nose-1.3.7/unit_tests/test_issue_100.rst.py3.patch nose-1.3.7/unit_tests/test_issue_101.py nose-1.3.7/unit_tests/test_issue_159.rst nose-1.3.7/unit_tests/test_issue_227.py nose-1.3.7/unit_tests/test_issue_230.py nose-1.3.7/unit_tests/test_issue_786.py nose-1.3.7/unit_tests/test_lazy_suite.py nose-1.3.7/unit_tests/test_loader.py nose-1.3.7/unit_tests/test_logcapture_plugin.py nose-1.3.7/unit_tests/test_logging.py nose-1.3.7/unit_tests/test_ls_tree.rst nose-1.3.7/unit_tests/test_multiprocess.py nose-1.3.7/unit_tests/test_multiprocess_runner.py nose-1.3.7/unit_tests/test_pdb_plugin.py nose-1.3.7/unit_tests/test_plugin.py nose-1.3.7/unit_tests/test_plugin_interfaces.py nose-1.3.7/unit_tests/test_plugin_manager.py nose-1.3.7/unit_tests/test_plugins.py nose-1.3.7/unit_tests/test_result_proxy.py nose-1.3.7/unit_tests/test_selector.py nose-1.3.7/unit_tests/test_selector_plugins.py nose-1.3.7/unit_tests/test_skip_plugin.py nose-1.3.7/unit_tests/test_suite.py nose-1.3.7/unit_tests/test_tools.py nose-1.3.7/unit_tests/test_twisted.py nose-1.3.7/unit_tests/test_twisted_testcase.py nose-1.3.7/unit_tests/test_utils.py nose-1.3.7/unit_tests/test_xunit.py phase `unpack' succeeded after 0.0 seconds starting phase `invoke-2to3' RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./distribute_setup.py RefactoringTool: Refactored ./patch.py RefactoringTool: No changes to ./selftest.py RefactoringTool: No changes to ./setup.py RefactoringTool: No changes to ./setup3lib.py RefactoringTool: Refactored ./doc/conf.py RefactoringTool: Refactored ./doc/docstring.py RefactoringTool: Refactored ./examples/attrib_plugin.py RefactoringTool: No changes to ./examples/html_plugin/htmlplug.py RefactoringTool: No changes to ./examples/html_plugin/setup.py RefactoringTool: No changes to ./examples/plugin/setup.py RefactoringTool: Refactored ./functional_tests/test_attribute_plugin.py RefactoringTool: Refactored ./functional_tests/test_buggy_generators.py RefactoringTool: No changes to ./functional_tests/test_cases.py RefactoringTool: Refactored ./functional_tests/test_collector.py RefactoringTool: Refactored ./functional_tests/test_commands.py RefactoringTool: No changes to ./functional_tests/test_config_files.py RefactoringTool: Refactored ./functional_tests/test_coverage_plugin.py RefactoringTool: No changes to ./functional_tests/test_defaultpluginmanager.py RefactoringTool: Refactored ./functional_tests/test_doctest_plugin.py RefactoringTool: No changes to ./functional_tests/test_entrypoints.py RefactoringTool: Refactored ./functional_tests/test_failure.py RefactoringTool: Refactored ./functional_tests/test_failuredetail_plugin.py --- ./distribute_setup.py (original) +++ ./distribute_setup.py (refactored) @@ -190,7 +190,7 @@ try: from urllib.request import urlopen except ImportError: - from urllib2 import urlopen + from urllib.request import urlopen tgz_name = "distribute-%s.tar.gz" % version url = download_base + tgz_name saveto = os.path.join(to_dir, tgz_name) --- ./patch.py (original) +++ ./patch.py (refactored) @@ -26,7 +26,7 @@ try: # cStringIO doesn't support unicode in 2.5 - from StringIO import StringIO + from io import StringIO except ImportError: # StringIO has been renamed to 'io' in 3.x from io import StringIO @@ -48,7 +48,7 @@ # Python 3.x has changed iter.next() to be next(iter) instead, so for # backwards compatibility, we'll just define a next() function under 2.x def next(iter): - return iter.next() + return iter.__next__() #------------------------------------------------ --- ./doc/conf.py (original) +++ ./doc/conf.py (refactored) @@ -49,8 +49,8 @@ master_doc = 'index' # General information about the project. -project = u'nose' -copyright = u'2009, Jason Pellerin' +project = 'nose' +copyright = '2009, Jason Pellerin' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -213,8 +213,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ - ('index', 'nose.tex', ur'nose Documentation', - ur'Jason Pellerin', 'manual'), + ('index', 'nose.tex', r'nose Documentation', + r'Jason Pellerin', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of --- ./doc/docstring.py (original) +++ ./doc/docstring.py (refactored) @@ -9,7 +9,7 @@ obj = resolve_name(obj_name) rst = ViewList() rst.append(obj.__doc__, '') - print "CALLED", obj_name, obj, rst + print("CALLED", obj_name, obj, rst) node = nodes.section() surrounding_title_styles = state.memo.title_styles surrounding_section_level = state.memo.section_level --- ./examples/attrib_plugin.py (original) +++ ./examples/attrib_plugin.py (refactored) @@ -41,7 +41,7 @@ # test function with single attribute @attr(priority = 1) def test_dummy(): - print "dummy" + print("dummy") # test function with multiple attributes @attr(status = "stable", # simple string attribute @@ -51,11 +51,11 @@ tags = ["http", "pop", "imap"]) # will be run if any of the list items # matches def test_foobar(): - print "foobar" + print("foobar") # another way of adding attributes... def test_fluffy(): - print "fluffy" + print("fluffy") test_fluffy.status = "unstable" test_fluffy.slow = True test_fluffy.priority = 2 @@ -64,7 +64,7 @@ class TestSomething: @attr(status = "stable", priority = 2) def test_xyz(self): - print "xyz" + print("xyz") # class methods "inherit" attributes from the class but can override them class TestOverride: @@ -74,9 +74,9 @@ @attr(value = "method") def test_override(self): # run with "nosetests -a value=method" - print "override" + print("override") def test_inherit(self): # run with "nosetests -a value=class" - print "inherit" + print("inherit") --- ./functional_tests/test_attribute_plugin.py (original) +++ ./functional_tests/test_attribute_plugin.py (refactored) @@ -17,9 +17,9 @@ activate = '-v' def runTest(self): - print '*' * 70 - print str(self.output) - print '*' * 70 + print('*' * 70) + print(str(self.output)) + print('*' * 70) self.verify() def verify(self): --- ./functional_tests/test_buggy_generators.py (original) +++ ./functional_tests/test_buggy_generators.py (refactored) @@ -1,6 +1,6 @@ import os import unittest -from cStringIO import StringIO +from io import StringIO from nose.core import TestProgram from nose.config import Config from nose.result import _TextTestResult @@ -27,7 +27,7 @@ config=Config(), exit=False) res = runner.result - print stream.getvalue() + print(stream.getvalue()) self.assertEqual(res.testsRun, 12, "Expected to run 12 tests, ran %s" % res.testsRun) assert not res.wasSuccessful() --- ./functional_tests/test_collector.py (original) +++ ./functional_tests/test_collector.py (refactored) @@ -2,7 +2,7 @@ import sys import unittest import warnings -from cStringIO import StringIO +from io import StringIO from nose.result import _TextTestResult here = os.path.dirname(__file__) support = os.path.join(here, 'support') --- ./functional_tests/test_commands.py (original) +++ ./functional_tests/test_commands.py (refactored) @@ -3,7 +3,7 @@ import unittest from nose.plugins.skip import SkipTest from nose import commands -from StringIO import StringIO +from io import StringIO support = os.path.join( os.path.dirname(__file__), 'support', 'issue191') @@ -32,12 +32,12 @@ 'package_dir': {'issue191': support}})) cmd.finalize_options() ## FIXME why doesn't Config see the chdir above? - print cmd._nosetests__config.workingDir + print(cmd._nosetests__config.workingDir) cmd._nosetests__config.workingDir = support cmd._nosetests__config.stream = buf try: cmd.run() - except SystemExit, e: + except SystemExit as e: self.assertFalse(e.args[0], buf.getvalue()) else: self.fail("cmd.run() did not exit") --- ./functional_tests/test_coverage_plugin.py (original) +++ ./functional_tests/test_coverage_plugin.py (refactored) @@ -40,7 +40,7 @@ super(TestCoveragePlugin, self).setUp() def runTest(self): - print(self.output) + print((self.output)) self.assertTrue( # Coverage < 4.0 ("blah 4 3 25% 1" in self.output) or --- ./functional_tests/test_doctest_plugin.py (original) +++ ./functional_tests/test_doctest_plugin.py (refactored) @@ -12,7 +12,7 @@ suitepath = os.path.join(support, 'dtt') def runTest(self): - print str(self.output) + print(str(self.output)) assert 'Doctest: some_mod ... ok' in self.output assert 'Doctest: some_mod.foo ... ok' in self.output @@ -27,7 +27,7 @@ suitepath = os.path.join(support, 'dtt', 'docs') def runTest(self): - print str(self.output) + print(str(self.output)) expect = [ 'Doctest: doc.txt ... ok', --- ./functional_tests/test_failure.py (original) +++ ./functional_tests/test_failure.py (refactored) @@ -15,11 +15,11 @@ return None def test_correct_exception_raised(self): - print - print '!' * 70 - print str(self.output) - print '!' * 70 - print + print() + print('!' * 70) + print(str(self.output)) + print('!' * 70) + print() # Look for the line in the traceback causing the failure assert "raise '\\xf1'.encode('ASCII')" in str(self.output) --- ./functional_tests/test_failuredetail_plugin.py (original) +++ ./functional_tests/test_failuredetail_plugin.py (refactored) @@ -14,9 +14,9 @@ suitepath = os.path.join(support, 'fdp') def runTest(self): - print '*' * 70 - print str(self.output) - print '*' * 70 + print('*' * 70) + print(str(self.output)) + print('*' * 70) expect = \ 'AssertionError: a is not 4\n' @@ -34,9 +34,9 @@ suitepath = os.path.join(support, 'fdp/test_fdp_no_capt.py') def runTest(self): - print '*' * 70 - print str(self.output) - print '*' * 70 + print('*' * 70) + print(str(self.output)) + print('*' * 70) RefactoringTool: Refactored ./functional_tests/test_generator_fixtures.py RefactoringTool: Refactored ./functional_tests/test_id_plugin.py RefactoringTool: Refactored ./functional_tests/test_importer.py RefactoringTool: Refactored ./functional_tests/test_isolate_plugin.py RefactoringTool: Refactored ./functional_tests/test_issue_072.py RefactoringTool: Refactored ./functional_tests/test_issue_082.py RefactoringTool: No changes to ./functional_tests/test_issue_408.py RefactoringTool: Refactored ./functional_tests/test_issue_649.py RefactoringTool: Refactored ./functional_tests/test_load_tests_from_test_case.py expect = \ 'AssertionError: a is not 4\n' @@ -53,9 +53,9 @@ suitepath = os.path.join(support, 'issue720') def runTest(self): - print '*' * 70 - print str(self.output) - print '*' * 70 + print('*' * 70) + print(str(self.output)) + print('*' * 70) assert 'UnicodeDecodeError' not in self.output assert 'UnicodeEncodeError' not in self.output --- ./functional_tests/test_generator_fixtures.py (original) +++ ./functional_tests/test_generator_fixtures.py (refactored) @@ -35,21 +35,21 @@ class TestClass(object): def setup(self): - print "setup called in", self + print("setup called in", self) self.called = ['setup'] def teardown(self): - print "teardown called in", self + print("teardown called in", self) eq_(self.called, ['setup']) self.called.append('teardown') def test(self): - print "test called in", self + print("test called in", self) for i in range(0, 5): yield self.check, i def check(self, i): - print "check called in", self + print("check called in", self) expect = ['setup'] #for x in range(0, i): # expect.append('setup') --- ./functional_tests/test_id_plugin.py (original) +++ ./functional_tests/test_id_plugin.py (refactored) @@ -7,7 +7,7 @@ from nose.plugins import PluginTester from nose.plugins.builtin import Doctest from nose.plugins.builtin import TestId -from cPickle import dump, load +from pickle import dump, load support = os.path.join(os.path.dirname(__file__), 'support') idfile = tempfile.mktemp() @@ -49,9 +49,9 @@ ids = load(fh)['ids'] fh.close() assert ids - assert ids.keys() - self.assertEqual(map(int, ids.keys()), ids.keys()) - assert ids.values() + assert list(ids.keys()) + self.assertEqual(list(map(int, list(ids.keys()))), list(ids.keys())) + assert list(ids.values()) class TestLoadNamesMode(PluginTester, unittest.TestCase): @@ -81,10 +81,10 @@ ids = load(fh) fh.close() assert ids - assert ids.keys() + assert list(ids.keys()) ids = ids['ids'] - self.assertEqual(filter(lambda i: int(i), ids.keys()), ids.keys()) - assert len(ids.keys()) > 2 + self.assertEqual([i for i in list(ids.keys()) if int(i)], list(ids.keys())) + assert len(list(ids.keys())) > 2 class TestLoadNamesMode_2(PluginTester, unittest.TestCase): @@ -142,7 +142,7 @@ fh = open(idfile, 'rb') ids = load(fh)['ids'] fh.close() - for key, (file, mod, call) in ids.items(): + for key, (file, mod, call) in list(ids.items()): assert mod != 'doctest', \ "Doctest test was incorrectly identified as being part of "\ "the doctest module itself (#%s)" % key @@ -166,9 +166,9 @@ return None def test_load_ids_doctest(self): - print '*' * 70 - print str(self.output) - print '*' * 70 + print('*' * 70) + print(str(self.output)) + print('*' * 70) assert 'Doctest: exm.add_one ... FAIL' in self.output @@ -188,9 +188,9 @@ suitepath = os.path.join(support, 'dtt', 'docs') def test_docfile_tests_get_ids(self): - print '>' * 70 - print str(self.output) - print '>' * 70 + print('>' * 70) + print(str(self.output)) + print('>' * 70) last = None for line in self.output: @@ -209,7 +209,7 @@ fh = open(idfile, 'rb') ids = load(fh)['ids'] fh.close() - for key, (file, mod, call) in ids.items(): + for key, (file, mod, call) in list(ids.items()): assert mod != 'doctest', \ "Doctest test was incorrectly identified as being part of "\ "the doctest module itself (#%s)" % key @@ -234,9 +234,9 @@ return None def test_load_from_name_id_docfile_test(self): - print '*' * 70 - print str(self.output) - print '*' * 70 + print('*' * 70) + print(str(self.output)) + print('*' * 70) assert 'Doctest: errdoc.txt ... FAIL' in self.output --- ./functional_tests/test_importer.py (original) +++ ./functional_tests/test_importer.py (refactored) @@ -27,7 +27,7 @@ self.has_symlinks = True def tearDown(self): - to_del = [ m for m in sys.modules.keys() if + to_del = [ m for m in list(sys.modules.keys()) if m not in self._mods ] if to_del: for mod in to_del: @@ -115,7 +115,7 @@ path = os.path.join(self.dir, 'package2', 'test_pak', 'test_sub', 'test_mod.py') mod = imp.importFromPath(path, 'test_pak.test_sub.test_mod') - print mod, dir(mod) + print(mod, dir(mod)) assert 'test_pak' in sys.modules, 'test_pak was not imported?' test_pak = sys.modules['test_pak'] assert hasattr(test_pak, 'test_sub'), "test_pak.test_sub was not set" --- ./functional_tests/test_isolate_plugin.py (original) +++ ./functional_tests/test_isolate_plugin.py (refactored) @@ -13,7 +13,7 @@ suitepath = os.path.join(support, 'ipt') def runTest(self): - print str(self.output) + print(str(self.output)) for line in self.output: if not line.strip(): @@ -43,7 +43,7 @@ return None def runTest(self): - print str(self.output) + print(str(self.output)) for line in self.output: if not line.strip(): --- ./functional_tests/test_issue_072.py (original) +++ ./functional_tests/test_issue_072.py (refactored) @@ -15,11 +15,11 @@ suitepath = os.path.join(support, 'issue072') def test_assert_info_in_output(self): - print - print '!' * 70 - print str(self.output) - print '!' * 70 - print + print() + print('!' * 70) + print(str(self.output)) + print('!' * 70) + print() assert '>> assert 4 == 2' in str(self.output) class TestFailureDetailWorksWhenChained(PluginTester, unittest.TestCase): @@ -30,11 +30,11 @@ def test_assert_info_and_capt_stdout_in_output(self): out = str(self.output) - print - print 'x' * 70 - print out - print 'x' * 70 - print + print() + print('x' * 70) + print(out) + print('x' * 70) + print() assert '>> assert 4 == 2' in out, \ "Assert info not found in chained output" --- ./functional_tests/test_issue_082.py (original) +++ ./functional_tests/test_issue_082.py (refactored) @@ -1,9 +1,9 @@ import os import re try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO import sys import unittest @@ -47,7 +47,7 @@ ) def test_assert_info_in_output(self): - print self.output + print(self.output) # In future, all four test cases will be run. Backwards-compatibility # means that can't be done in nose 0.10. assert '_mypackage._eggs' not in str(self.output) @@ -63,7 +63,7 @@ suitepath = os.path.join(support, 'issue082') def test_assert_info_in_output(self): - print self.output + print(self.output) assert '_mypackage._eggs' not in str(self.output) assert '_mypackage.bacon' not in str(self.output) assert 'mypublicpackage._foo' not in str(self.output) --- ./functional_tests/test_issue_649.py (original) +++ ./functional_tests/test_issue_649.py (refactored) @@ -14,5 +14,5 @@ suitepath = os.path.join(support, 'issue649') def runTest(self): - print str(self.output) + print(str(self.output)) assert 'UnicodeDecodeError' not in self.output --- ./functional_tests/test_load_tests_from_test_case.py (original) RefactoringTool: Refactored ./functional_tests/test_loader.py RefactoringTool: Refactored ./functional_tests/test_namespace_pkg.py RefactoringTool: Refactored ./functional_tests/test_plugin_api.py RefactoringTool: Refactored ./functional_tests/test_plugins.py +++ ./functional_tests/test_load_tests_from_test_case.py (refactored) @@ -15,15 +15,15 @@ enabled = True def options(self, parser, env): - print "options" + print("options") pass def configure(self, options, conf): - print "configure" + print("configure") pass def loadTestsFromTestCase(self, testCaseClass): - print "Called!" + print("Called!") class Derived(testCaseClass): def setUp(self): pass @@ -46,7 +46,7 @@ expect = [ 'test_value (%s.Derived) ... ERROR' % __name__, 'test_value (tests.Tests) ... ok'] - print str(self.output) + print(str(self.output)) for line in self.output: if expect: self.assertEqual(line.strip(), expect.pop(0)) --- ./functional_tests/test_loader.py (original) +++ ./functional_tests/test_loader.py (refactored) @@ -2,7 +2,7 @@ import sys import unittest from difflib import ndiff -from cStringIO import StringIO +from io import StringIO from nose.config import Config from nose.plugins.manager import PluginManager @@ -25,7 +25,7 @@ suite.ContextSuiteFactory.suiteClass = TreePrintContextSuite def tearDown(self): - to_del = [ m for m in sys.modules.keys() if + to_del = [ m for m in list(sys.modules.keys()) if m not in self._mods ] if to_del: for mod in to_del: @@ -71,7 +71,7 @@ dir_suite(res) m = sys.modules['test_pak'] - print "test pak state", m.state + print("test pak state", m.state) assert not res.errors, res.errors assert not res.failures, res.failures @@ -112,7 +112,7 @@ assert 'test_pak' in sys.modules, \ "Context did not load test_pak" m = sys.modules['test_pak'] - print "test pak state", m.state + print("test pak state", m.state) expect = ['test_pak.setup', 'test_pak.test_mod.setup', 'test_pak.test_mod.test_add', @@ -133,7 +133,7 @@ assert 'test_pak' in sys.modules, \ "Context did not load test_pak" m = sys.modules['test_pak'] - print "test pak state", m.state + print("test pak state", m.state) expect = ['test_pak.setup', 'test_pak.test_mod.setup', 'test_pak.test_mod.test_add', @@ -182,7 +182,7 @@ assert 'test_pak' in sys.modules, \ "Context not load test_pak" m = sys.modules['test_pak'] - print "test pak state", m.state + print("test pak state", m.state) expect = ['test_pak.setup', 'test_pak.test_sub.setup', 'test_pak.test_sub.test_mod.setup', @@ -204,14 +204,14 @@ ['test_pak.test_sub.test_mod:TestMaths.test_div', 'test_pak.test_sub.test_mod:TestMaths.test_two_two', 'test_pak.test_mod:test_add']) - print suite + print(suite) suite(res) assert not res.errors, res.errors assert not res.failures, res.failures assert 'test_pak' in sys.modules, \ "Context not load test_pak" m = sys.modules['test_pak'] - print "test pak state", m.state + print("test pak state", m.state) expect = ['test_pak.setup', 'test_pak.test_sub.setup', 'test_pak.test_sub.test_mod.setup', @@ -240,16 +240,16 @@ ['test_pak1.test_mod', 'test_pak2:test_two_two', 'test_pak1:test_one_one']) - print suite + print(suite) suite(res) res.printErrors() - print stream.getvalue() + print(stream.getvalue()) assert not res.errors, res.errors assert not res.failures, res.failures assert 'state' in sys.modules, \ "Context not load state module" m = sys.modules['state'] - print "state", m.called + print("state", m.called) expect = ['test_pak1.setup', 'test_pak1.test_mod.setup', @@ -271,16 +271,16 @@ ['test_pak1.test_mod', 'test_pak2:test_two_two', 'test_mod']) - print suite + print(suite) suite(res) res.printErrors() - print stream.getvalue() + print(stream.getvalue()) assert not res.errors, res.errors assert not res.failures, res.failures assert 'state' in sys.modules, \ "Context not load state module" m = sys.modules['state'] - print "state", m.called + print("state", m.called) expect = ['test_pak1.setup', 'test_pak1.test_mod.setup', @@ -348,7 +348,7 @@ descriptions=0, verbosity=1) suite(res) - print res.errors + print(res.errors) res.printErrors() assert res.errors, "Expected errors but got none" assert not res.failures, res.failures @@ -364,7 +364,7 @@ stream=_WritelnDecorator(sys.stdout), descriptions=0, verbosity=1) suite(res) - print res.errors + print(res.errors) res.printErrors() assert res.errors, "Expected errors but got none" assert not res.failures, res.failures @@ -381,7 +381,7 @@ stream=_WritelnDecorator(sys.stdout), descriptions=0, verbosity=1) suite(res) - print res.errors + print(res.errors) assert res.errors, "Expected errors but got none" assert not res.failures, res.failures @@ -412,7 +412,7 @@ stream=_WritelnDecorator(sys.stdout), descriptions=0, verbosity=1) suite(res) - print res.errors + print(res.errors) self.assertEqual(len(res.errors), 1) assert 'raise Exception("pow")' in res.errors[0][1] @@ -426,7 +426,7 @@ assert 'test_pak' in sys.modules, \ "Context did not load test_pak" m = sys.modules['test_pak'] - print "test pak state", m.state + print("test pak state", m.state) expect = ['test_pak.setup', 'test_pak.test_sub.setup', 'test_pak.test_sub.test_sub_init', @@ -447,7 +447,7 @@ assert 'test_pak' in sys.modules, \ "Context did not load test_pak" m = sys.modules['test_pak'] - print "test pak state", m.state + print("test pak state", m.state) expect = ['test_pak.setup', 'test_pak.test_sub.setup', 'test_pak.test_sub.test_sub_init', @@ -480,7 +480,7 @@ indent = '' def setUp(self): - print self, 'setup -->' + print(self, 'setup -->') suite.ContextSuite.setUp(self) TreePrintContextSuite.indent += ' ' @@ -489,7 +489,7 @@ try: suite.ContextSuite.tearDown(self) finally: - print self, 'teardown <--' + print(self, 'teardown <--') def __repr__(self): return '%s<%s>' % (self.indent, --- ./functional_tests/test_namespace_pkg.py (original) +++ ./functional_tests/test_namespace_pkg.py (refactored) @@ -1,7 +1,7 @@ import os import sys import unittest -from cStringIO import StringIO +from io import StringIO from nose.core import TestProgram from test_program import TestRunner --- ./functional_tests/test_plugin_api.py (original) +++ ./functional_tests/test_plugin_api.py (refactored) @@ -31,9 +31,9 @@ suitepath = os.path.join(support, 'package2') def runTest(self): - print "x" * 70 - print str(self.output) - print "x" * 70 + print("x" * 70) + print(str(self.output)) + print("x" * 70) for line in self.output: if line.startswith('test_pak'): assert line.strip().endswith('FAIL'), \ --- ./functional_tests/test_plugins.py (original) +++ ./functional_tests/test_plugins.py (refactored) @@ -23,7 +23,7 @@ RefactoringTool: Refactored ./functional_tests/test_plugintest.py RefactoringTool: Refactored ./functional_tests/test_program.py RefactoringTool: Refactored ./functional_tests/test_result.py RefactoringTool: No changes to ./functional_tests/test_selector.py RefactoringTool: No changes to ./functional_tests/test_skip_pdb_interaction.py RefactoringTool: Refactored ./functional_tests/test_string_exception.py RefactoringTool: Refactored ./functional_tests/test_success.py RefactoringTool: Refactored ./functional_tests/test_suite.py RefactoringTool: Refactored ./functional_tests/test_xunit.py conf = Config(plugins=man, stream=sys.stdout) t = TestProgram(defaultTest=wdir, config=conf, argv=['test_plugin_calls_package1'], exit=False) - print man.calls() + print(man.calls()) assert man.called self.assertEqual( @@ -47,7 +47,7 @@ conf = Config(plugins=man, stream=sys.stdout) t = TestProgram(defaultTest=wdir, config=conf, argv=['test_plugin_calls_package1', '-v'], exit=False) - print man.calls() + print(man.calls()) assert man.called self.assertEqual( --- ./functional_tests/test_plugintest.py (original) +++ ./functional_tests/test_plugintest.py (refactored) @@ -2,7 +2,7 @@ import unittest, os from nose.plugins import PluginTester, Plugin from nose.tools import eq_ -from cStringIO import StringIO +from io import StringIO class StubPlugin(Plugin): def options(self, parser, env=os.environ): --- ./functional_tests/test_program.py (original) +++ ./functional_tests/test_program.py (refactored) @@ -1,6 +1,6 @@ import os import unittest -from cStringIO import StringIO +from io import StringIO from nose import SkipTest from nose.core import TestProgram from nose.config import Config @@ -35,7 +35,7 @@ config=Config(), exit=False) res = runner.result - print stream.getvalue() + print(stream.getvalue()) self.assertEqual(res.testsRun, 0, "Expected to run 0 tests, ran %s" % res.testsRun) assert res.wasSuccessful() @@ -55,7 +55,7 @@ config=Config(), exit=False) res = runner.result - print stream.getvalue() + print(stream.getvalue()) self.assertEqual(res.testsRun, 6, "Expected to run 6 tests, ran %s" % res.testsRun) assert res.wasSuccessful() @@ -84,7 +84,7 @@ config=Config(), exit=False) res = runner.result - print stream.getvalue() + print(stream.getvalue()) self.assertEqual(res.testsRun, 2, "Expected to run 2 tests, ran %s" % res.testsRun) assert res.wasSuccessful() @@ -109,9 +109,9 @@ config=Config(stream=stream), exit=False) res = runner.result - print stream.getvalue() - print "-----" - print repr(res) + print(stream.getvalue()) + print("-----") + print(repr(res)) self.assertEqual(res.testsRun, 4, "Expected to run 4 tests, ran %s" % (res.testsRun,)) @@ -147,7 +147,7 @@ plugins=DefaultPluginManager()), exit=False) res = runner.result - print stream.getvalue() + print(stream.getvalue()) self.assertEqual(res.testsRun, 0) # error is in setup assert not res.wasSuccessful() assert res.errors @@ -164,7 +164,7 @@ config=Config(), exit=False) res = runner.result - print stream.getvalue() + print(stream.getvalue()) self.assertEqual(res.testsRun, 8) def test_illegal_packages_not_selected(self): @@ -178,7 +178,7 @@ plugins=DefaultPluginManager()), exit=False) res = runner.result - print stream.getvalue() + print(stream.getvalue()) self.assertEqual(res.testsRun, 0) assert res.wasSuccessful() assert not res.errors --- ./functional_tests/test_result.py (original) +++ ./functional_tests/test_result.py (refactored) @@ -1,7 +1,7 @@ import os import sys import unittest -from cStringIO import StringIO +from io import StringIO from nose.config import Config from nose.core import TestProgram from nose.plugins.manager import PluginManager @@ -23,8 +23,8 @@ TestProgram(argv=['t', '--with-todo', pkpath], config=config, exit=False) out = stream.getvalue() - print out - self.assert_('FAILED (TODO=1)' in out) + print(out) + self.assertTrue('FAILED (TODO=1)' in out) if __name__ == '__main__': --- ./functional_tests/test_string_exception.py (original) +++ ./functional_tests/test_string_exception.py (refactored) @@ -21,11 +21,11 @@ raise SkipTest("String exceptions are not supported in this " "version of Python") - print - print '!' * 70 - print str(self.output) - print '!' * 70 - print + print() + print('!' * 70) + print(str(self.output)) + print('!' * 70) + print() assert 'raise "string exception"' in str(self.output) assert 'raise "string exception in setup"' in str(self.output) assert 'raise "string exception in teardown"' in str(self.output) --- ./functional_tests/test_success.py (original) +++ ./functional_tests/test_success.py (refactored) @@ -15,7 +15,7 @@ # this test fails if the final terminating newline is not present (it # could still be written as a doctest -- PluginTester was just closer # to hand) - print self.output + print(self.output) output = remove_timings(str(self.output)) assert output == """\ test.test ... ok @@ -32,7 +32,7 @@ suitepath = os.path.join(support, 'empty') def test_zero_tests_pass(self): - print self.output + print(self.output) output = remove_timings(str(self.output)) assert output == """\ --- ./functional_tests/test_suite.py (original) +++ ./functional_tests/test_suite.py (refactored) @@ -14,7 +14,7 @@ sys.path.insert(0, os.path.join(support, 'package2')) def tearDown(self): - to_del = [ m for m in sys.modules.keys() if + to_del = [ m for m in list(sys.modules.keys()) if m not in self._mods ] if to_del: for mod in to_del: --- ./functional_tests/test_xunit.py (original) +++ ./functional_tests/test_xunit.py (refactored) @@ -21,7 +21,7 @@ suitepath = os.path.join(support, 'xunit') def runTest(self): - print str(self.output) + print(str(self.output)) assert "ERROR: test_error" in self.output assert "FAIL: test_fail" in self.output @@ -31,7 +31,7 @@ f = codecs.open(xml_results_filename,'r', encoding='utf8') result = f.read() f.close() - print result.encode('utf8', 'replace') + print(result.encode('utf8', 'replace')) assert '' in result assert '' in result @@ -53,11 +53,11 @@ suitepath = os.path.join(support, 'issue134') def runTest(self): - print str(self.output) + print(str(self.output)) f = open(xml_results_filename,'r') result = f.read() f.close() - print result + print(result) assert 'raise IOError(42, "test")' in result assert 'tests="1" errors="1" failures="0" skip="0"' in result @@ -69,11 +69,11 @@ suitepath = os.path.join(support, 'issue279') def runTest(self): - print str(self.output) + print(str(self.output)) f = open(xml_results_filename,'r') result = f.read() f.close() - print result + print(result) assert 'tests="1" errors="1" failures="0" skip="0"' in result assert "Exception: I would prefer not to" in result @@ -85,11 +85,11 @@ suitepath = os.path.join(support, 'issue680') def runTest(self): - print str(self.output) + print(str(self.output)) f = open(xml_results_filename,'rb') result = f.read().decode('utf-8') f.close() - print result + print(result) RefactoringTool: No changes to ./functional_tests/doc_tests/test_allmodules/support/mod.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures_fixtures.py RefactoringTool: Refactored ./functional_tests/doc_tests/test_issue119/test_zeronine.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_issue142/support/errorclass_failing_test.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_issue142/support/errorclass_failure_plugin.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_issue142/support/errorclass_tests.py RefactoringTool: Refactored ./functional_tests/doc_tests/test_issue145/support/package1/__init__.py RefactoringTool: Refactored ./functional_tests/doc_tests/test_issue145/support/package2c/__init__.py RefactoringTool: Refactored ./functional_tests/doc_tests/test_issue145/support/package2f/__init__.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_multiprocess/multiprocess_fixtures.py RefactoringTool: Refactored ./functional_tests/doc_tests/test_multiprocess/support/test_can_split.py RefactoringTool: Refactored ./functional_tests/doc_tests/test_multiprocess/support/test_not_shared.py RefactoringTool: Refactored ./functional_tests/doc_tests/test_multiprocess/support/test_shared.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_selector_plugin/support/mypackage/strings.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_selector_plugin/support/tests/testlib.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py RefactoringTool: No changes to ./functional_tests/doc_tests/test_xunit_plugin/support/test_skip.py RefactoringTool: No changes to ./functional_tests/support/test_buggy_generators.py RefactoringTool: No changes to ./functional_tests/support/att/test_attr.py RefactoringTool: Refactored ./functional_tests/support/coverage/blah.py RefactoringTool: Refactored ./functional_tests/support/coverage2/blah.py RefactoringTool: Refactored ./functional_tests/support/coverage2/moo.py RefactoringTool: No changes to ./functional_tests/support/ctx/mod_import_skip.py RefactoringTool: No changes to ./functional_tests/support/ctx/mod_setup_fails.py RefactoringTool: No changes to ./functional_tests/support/ctx/mod_setup_skip.py RefactoringTool: No changes to ./functional_tests/support/dtt/some_mod.py RefactoringTool: No changes to ./functional_tests/support/ep/setup.py RefactoringTool: Refactored ./functional_tests/support/fdp/test_fdp.py RefactoringTool: No changes to ./functional_tests/support/fdp/test_fdp_no_capt.py RefactoringTool: Refactored ./functional_tests/support/gen/test.py RefactoringTool: No changes to ./functional_tests/support/idp/exm.py RefactoringTool: No changes to ./functional_tests/support/idp/tests.py RefactoringTool: Refactored ./functional_tests/support/ipt/test1/ipthelp.py RefactoringTool: Refactored ./functional_tests/support/ipt/test1/tests.py RefactoringTool: Refactored ./functional_tests/support/ipt/test2/ipthelp.py RefactoringTool: Refactored ./functional_tests/support/ipt/test2/tests.py RefactoringTool: No changes to ./functional_tests/support/issue038/test.py RefactoringTool: Refactored ./functional_tests/support/issue072/test.py RefactoringTool: No changes to ./functional_tests/support/issue082/_mypackage/_eggs.py RefactoringTool: No changes to ./functional_tests/support/issue082/_mypackage/bacon.py RefactoringTool: No changes to ./functional_tests/support/issue082/mypublicpackage/_foo.py RefactoringTool: No changes to ./functional_tests/support/issue082/mypublicpackage/bar.py RefactoringTool: No changes to ./functional_tests/support/issue130/test.py RefactoringTool: Refactored ./functional_tests/support/issue134/test.py RefactoringTool: No changes to ./functional_tests/support/issue143/not-a-package/test.py RefactoringTool: No changes to ./functional_tests/support/issue191/setup.py RefactoringTool: No changes to ./functional_tests/support/issue269/test_bad_class.py RefactoringTool: No changes to ./functional_tests/support/issue279/test_mod_setup_fails.py RefactoringTool: No changes to ./functional_tests/support/issue408/test.py RefactoringTool: No changes to ./functional_tests/support/issue513/test.py RefactoringTool: Refactored ./functional_tests/support/issue649/test.py RefactoringTool: Refactored ./functional_tests/support/issue680/test.py RefactoringTool: No changes to ./functional_tests/support/issue700/test.py RefactoringTool: Refactored ./functional_tests/support/issue720/test.py RefactoringTool: No changes to ./functional_tests/support/issue771/test.py RefactoringTool: No changes to ./functional_tests/support/ltfn/test_mod.py RefactoringTool: No changes to ./functional_tests/support/ltfn/test_pak1/__init__.py RefactoringTool: No changes to ./functional_tests/support/ltfn/test_pak1/test_mod.py RefactoringTool: No changes to ./functional_tests/support/ltfn/test_pak2/__init__.py RefactoringTool: No changes to ./functional_tests/support/namespace_pkg/namespace_pkg/example.py RefactoringTool: No changes to ./functional_tests/support/namespace_pkg/namespace_pkg/test_pkg.py RefactoringTool: No changes to ./functional_tests/support/namespace_pkg/site-packages/namespace_pkg/example2.py RefactoringTool: No changes to ./functional_tests/support/namespace_pkg/site-packages/namespace_pkg/test_pkg2.py RefactoringTool: No changes to ./functional_tests/support/package1/example.py RefactoringTool: Refactored ./functional_tests/support/package2/test_pak/__init__.py RefactoringTool: Refactored ./functional_tests/support/package2/test_pak/test_mod.py assert 'tests="1" errors="0" failures="0" skip="0"' in result @@ -100,11 +100,11 @@ suitepath = os.path.join(support, 'issue700') def runTest(self): - print str(self.output) + print(str(self.output)) f = open(xml_results_filename,'r') result = f.read() f.close() - print result + print(result) assert 'tests="1" errors="0" failures="0" skip="0"' in result assert 'line1\n' in result assert 'line2\n' in result @@ -118,10 +118,10 @@ suitepath = os.path.join(support, 'issue859') def runTest(self): - print str(self.output) + print(str(self.output)) f = open(xml_results_filename, 'r') result = f.read() f.close() - print result + print(result) assert 'tests="1" errors="0" failures="0" skip="0"' in result assert 'testsuite name="TestIssue859"' in result --- ./functional_tests/doc_tests/test_issue119/test_zeronine.py (original) +++ ./functional_tests/doc_tests/test_issue119/test_zeronine.py (refactored) @@ -18,7 +18,7 @@ suitepath = os.path.join(here, 'empty_plugin.rst') def test_empty_zero_nine_does_not_crash(self): - print self.output + print(self.output) assert "'EmptyPlugin' object has no attribute 'loadTestsFromPath'" \ not in self.output --- ./functional_tests/doc_tests/test_issue145/support/package1/__init__.py (original) +++ ./functional_tests/doc_tests/test_issue145/support/package1/__init__.py (refactored) @@ -1,2 +1,2 @@ def setup(): - print 'package1 setup' + print('package1 setup') --- ./functional_tests/doc_tests/test_issue145/support/package2c/__init__.py (original) +++ ./functional_tests/doc_tests/test_issue145/support/package2c/__init__.py (refactored) @@ -1,2 +1,2 @@ def setup(): - print 'package2c setup' + print('package2c setup') --- ./functional_tests/doc_tests/test_issue145/support/package2f/__init__.py (original) +++ ./functional_tests/doc_tests/test_issue145/support/package2f/__init__.py (refactored) @@ -1,2 +1,2 @@ def setup(): - print 'package2f setup' + print('package2f setup') --- ./functional_tests/doc_tests/test_multiprocess/support/test_can_split.py (original) +++ ./functional_tests/doc_tests/test_multiprocess/support/test_can_split.py (refactored) @@ -4,12 +4,12 @@ _multiprocess_can_split_ = 1 def setup(): - print >> sys.stderr, "setup called" + print("setup called", file=sys.stderr) called.append('setup') def teardown(): - print >> sys.stderr, "teardown called" + print("teardown called", file=sys.stderr) called.append('teardown') --- ./functional_tests/doc_tests/test_multiprocess/support/test_not_shared.py (original) +++ ./functional_tests/doc_tests/test_multiprocess/support/test_not_shared.py (refactored) @@ -4,12 +4,12 @@ _multiprocess_ = 1 def setup(): - print >> sys.stderr, "setup called" + print("setup called", file=sys.stderr) called.append('setup') def teardown(): - print >> sys.stderr, "teardown called" + print("teardown called", file=sys.stderr) called.append('teardown') --- ./functional_tests/doc_tests/test_multiprocess/support/test_shared.py (original) +++ ./functional_tests/doc_tests/test_multiprocess/support/test_shared.py (refactored) @@ -28,12 +28,12 @@ def setup(): - print >> sys.stderr, "setup called" + print("setup called", file=sys.stderr) _log('setup') def teardown(): - print >> sys.stderr, "teardown called" + print("teardown called", file=sys.stderr) _clear() --- ./functional_tests/support/coverage/blah.py (original) +++ ./functional_tests/support/coverage/blah.py (refactored) @@ -1,6 +1,6 @@ def dostuff(): - print 'hi' + print('hi') def notcov(): - print 'not covered' + print('not covered') --- ./functional_tests/support/coverage2/blah.py (original) +++ ./functional_tests/support/coverage2/blah.py (refactored) @@ -1,6 +1,6 @@ def dostuff(): - print 'hi' + print('hi') def notcov(): - print 'not covered' + print('not covered') --- ./functional_tests/support/coverage2/moo.py (original) +++ ./functional_tests/support/coverage2/moo.py (refactored) @@ -1,2 +1,2 @@ def moo(): - print 'covered' + print('covered') --- ./functional_tests/support/fdp/test_fdp.py (original) +++ ./functional_tests/support/fdp/test_fdp.py (refactored) @@ -2,7 +2,7 @@ raise TypeError("I can't type") def test_fail(): - print "Hello" + print("Hello") a = 2 assert a == 4, "a is not 4" --- ./functional_tests/support/gen/test.py (original) +++ ./functional_tests/support/gen/test.py (refactored) @@ -7,6 +7,6 @@ def func(_l, _n): eq_(len(_l), _n) l = [] - for i in xrange(5): + for i in range(5): yield func, l, i l.append(None) --- ./functional_tests/support/ipt/test1/ipthelp.py (original) +++ ./functional_tests/support/ipt/test1/ipthelp.py (refactored) @@ -1,4 +1,4 @@ -print "1help imported" +print("1help imported") def help(): - print "1help called" + print("1help called") pass --- ./functional_tests/support/ipt/test1/tests.py (original) +++ ./functional_tests/support/ipt/test1/tests.py (refactored) @@ -1,7 +1,7 @@ import sys -print 'ipthelp', sys.modules.get('ipthelp') +print('ipthelp', sys.modules.get('ipthelp')) import ipthelp -print ipthelp +print(ipthelp) def test1(): ipthelp.help() --- ./functional_tests/support/ipt/test2/ipthelp.py (original) +++ ./functional_tests/support/ipt/test2/ipthelp.py (refactored) @@ -1,5 +1,5 @@ -print "2help imported" +print("2help imported") def help(a): - print "2 help %s" % 1 + print("2 help %s" % 1) pass --- ./functional_tests/support/ipt/test2/tests.py (original) +++ ./functional_tests/support/ipt/test2/tests.py (refactored) @@ -1,8 +1,8 @@ import sys -print 'ipthelp', sys.modules.get('ipthelp') +print('ipthelp', sys.modules.get('ipthelp')) import ipthelp -print ipthelp +print(ipthelp) def test2(): ipthelp.help(1) --- ./functional_tests/support/issue072/test.py (original) +++ ./functional_tests/support/issue072/test.py (refactored) @@ -1,4 +1,4 @@ def test(): - print "something" + print("something") a = 4 assert a == 2 --- ./functional_tests/support/issue134/test.py (original) +++ ./functional_tests/support/issue134/test.py (refactored) @@ -1,3 +1,3 @@ def test(): - print "something" + print("something") raise IOError(42, "test") --- ./functional_tests/support/issue649/test.py (original) +++ ./functional_tests/support/issue649/test.py (refactored) @@ -5,5 +5,5 @@ class TestUnicodeInAssertion(unittest.TestCase): def test_unicodeInAssertion(self): - print "Wurst!" + print("Wurst!") raise ValueError("Käse!") --- ./functional_tests/support/issue680/test.py (original) +++ ./functional_tests/support/issue680/test.py (refactored) @@ -1,3 +1,3 @@ # coding: utf-8 def test_foo(): - print(u"abc€") + print("abc€") --- ./functional_tests/support/issue720/test.py (original) +++ ./functional_tests/support/issue720/test.py (refactored) @@ -2,5 +2,5 @@ import unittest class Test(unittest.TestCase): def test(self): - print u"Unicöde" + print("Unicöde") assert 1 == 2 --- ./functional_tests/support/package2/test_pak/__init__.py (original) +++ ./functional_tests/support/package2/test_pak/__init__.py (refactored) @@ -1,4 +1,4 @@ -print "*** test_pak imported" +print("*** test_pak imported") state = [] def setup(): --- ./functional_tests/support/package2/test_pak/test_mod.py (original) +++ ./functional_tests/support/package2/test_pak/test_mod.py (refactored) @@ -1,14 +1,14 @@ -print "test_mod imported!" +print("test_mod imported!") import maths from test_pak import state def setup(): - print "MOD setup called", state, id(state) + print("MOD setup called", state, id(state)) state.append('test_pak.test_mod.setup') def test_add(): - print "MOD.test_add called", state, id(state) + print("MOD.test_add called", state, id(state)) RefactoringTool: No changes to ./functional_tests/support/package2/test_pak/test_sub/__init__.py RefactoringTool: No changes to ./functional_tests/support/package2/test_pak/test_sub/test_mod.py RefactoringTool: No changes to ./functional_tests/support/string-exception/test.py RefactoringTool: No changes to ./functional_tests/support/todo/test_with_todo.py RefactoringTool: No changes to ./functional_tests/support/todo/todoplug.py RefactoringTool: No changes to ./functional_tests/support/twist/test_twisted.py RefactoringTool: Refactored ./functional_tests/support/xunit/test_xunit_as_suite.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/__init__.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/test_class.py RefactoringTool: Refactored ./functional_tests/test_multiprocessing/test_keyboardinterrupt.py RefactoringTool: Refactored ./functional_tests/test_multiprocessing/test_nameerror.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/test_process_timeout.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/support/class.py RefactoringTool: Refactored ./functional_tests/test_multiprocessing/support/fake_nosetest.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/support/keyboardinterrupt.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/support/keyboardinterrupt_twice.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/support/timeout.py RefactoringTool: No changes to ./functional_tests/test_multiprocessing/support/concurrent_shared/__init__.py RefactoringTool: No changes to ./nose/__init__.py RefactoringTool: No changes to ./nose/__main__.py RefactoringTool: Refactored ./nose/case.py RefactoringTool: Refactored ./nose/commands.py RefactoringTool: Refactored ./nose/config.py state.append('test_pak.test_mod.test_add') assert maths.add(1, 2) == 3 @@ -16,5 +16,5 @@ state.append('test_pak.test_mod.test_minus') def teardown(): - print "MOD teardown called", state, id(state) + print("MOD teardown called", state, id(state)) state.append('test_pak.test_mod.teardown') --- ./functional_tests/support/xunit/test_xunit_as_suite.py (original) +++ ./functional_tests/support/xunit/test_xunit_as_suite.py (refactored) @@ -15,7 +15,7 @@ raise TypeError("oops, wrong type") def test_non_ascii_error(self): - raise Exception(u"日本") + raise Exception("日本") def test_output(self): sys.stdout.write("test-generated output\n") --- ./functional_tests/test_multiprocessing/test_keyboardinterrupt.py (original) +++ ./functional_tests/test_multiprocessing/test_keyboardinterrupt.py (refactored) @@ -66,11 +66,11 @@ process, logfile, _ = keyboardinterrupt('keyboardinterrupt.py') stdout, stderr = [s.decode('utf-8') for s in process.communicate(None)] log = get_log_content(logfile) - print stderr - print '----' - print stdout - print '----' - print log + print(stderr) + print('----') + print(stdout) + print('----') + print(log) assert 'setup' in log assert 'test_timeout' in log assert 'test_timeout_finished' not in log @@ -88,11 +88,11 @@ os.killpg(process.pid, signal.SIGINT) stdout, stderr = [s.decode('utf-8') for s in process.communicate(None)] log = get_log_content(logfile) - print stderr - print '----' - print stdout - print '----' - print log + print(stderr) + print('----') + print(stdout) + print('----') + print(log) assert 'setup' in log assert 'test_timeout' in log assert 'test_timeout_finished' not in log --- ./functional_tests/test_multiprocessing/test_nameerror.py (original) +++ ./functional_tests/test_multiprocessing/test_nameerror.py (refactored) @@ -7,7 +7,7 @@ suitepath = os.path.join(os.path.dirname(__file__), 'support', 'nameerror.py') def runTest(self): - print str(self.output) + print(str(self.output)) assert 'NameError' in self.output assert "'undefined_variable' is not defined" in self.output --- ./functional_tests/test_multiprocessing/support/fake_nosetest.py (original) +++ ./functional_tests/test_multiprocessing/support/fake_nosetest.py (refactored) @@ -8,7 +8,7 @@ if __name__ == '__main__': if len(sys.argv) < 3: - print "USAGE: %s TEST_FILE LOG_FILE KILL_FILE" % sys.argv[0] + print("USAGE: %s TEST_FILE LOG_FILE KILL_FILE" % sys.argv[0]) sys.exit(1) os.environ['NOSE_MP_LOG']=sys.argv[2] os.environ['NOSE_MP_KILL']=sys.argv[3] --- ./nose/case.py (original) +++ ./nose/case.py (refactored) @@ -341,7 +341,7 @@ self.descriptor = descriptor if isfunction(method): raise ValueError("Unbound methods must be wrapped using pyversion.unbound_method before passing to MethodTestCase") - self.cls = method.im_class + self.cls = method.__self__.__class__ self.inst = self.cls() if self.test is None: method_name = self.method.__name__ --- ./nose/commands.py (original) +++ ./nose/commands.py (refactored) @@ -148,7 +148,7 @@ ei_cmd = self.get_finalized_command("egg_info") argv = ['nosetests', '--where', ei_cmd.egg_base] - for (option_name, cmd_name) in self.option_to_cmds.items(): + for (option_name, cmd_name) in list(self.option_to_cmds.items()): if option_name in option_blacklist: continue value = getattr(self, option_name) --- ./nose/config.py (original) +++ ./nose/config.py (refactored) @@ -3,7 +3,7 @@ import os import re import sys -import ConfigParser +import configparser from optparse import OptionParser from nose.util import absdir, tolist from nose.plugins.manager import NoPlugins @@ -62,24 +62,24 @@ def _readFromFilenames(self, filenames): config = [] for filename in filenames: - cfg = ConfigParser.RawConfigParser() + cfg = configparser.RawConfigParser() try: cfg.read(filename) - except ConfigParser.Error, exc: + except configparser.Error as exc: raise ConfigError("Error reading config file %r: %s" % (filename, str(exc))) config.extend(self._configTuples(cfg, filename)) return config def _readFromFileObject(self, fh): - cfg = ConfigParser.RawConfigParser() + cfg = configparser.RawConfigParser() try: filename = fh.name except AttributeError: filename = '' try: cfg.readfp(fh) - except ConfigParser.Error, exc: + except configparser.Error as exc: raise ConfigError("Error reading config file %r: %s" % (filename, str(exc))) return self._configTuples(cfg, filename) @@ -89,7 +89,7 @@ config_files.readline except AttributeError: filename_or_filenames = config_files - if isinstance(filename_or_filenames, basestring): + if isinstance(filename_or_filenames, str): filenames = [filename_or_filenames] else: filenames = filename_or_filenames @@ -113,12 +113,12 @@ continue try: self._processConfigValue(name, value, values, parser) - except NoSuchOptionError, exc: + except NoSuchOptionError as exc: self._file_error( "Error reading config file %r: " "no such option %r" % (filename, exc.name), name=name, filename=filename) - except optparse.OptionValueError, exc: + except optparse.OptionValueError as exc: msg = str(exc).replace('--' + name, repr(name), 1) self._file_error("Error reading config file %r: " "%s" % (filename, msg), @@ -128,12 +128,12 @@ values = self._parser.get_default_values() try: config = self._readConfiguration(config_files) - except ConfigError, exc: + except ConfigError as exc: self._error(str(exc)) else: try: self._applyConfigurationToValues(self._parser, config, values) - except ConfigError, exc: + except ConfigError as exc: self._error(str(exc)) return self._parser.parse_args(args, values) @@ -195,7 +195,7 @@ r'^_', r'^setup\.py$', ] - self.ignoreFiles = map(re.compile, self.ignoreFilesDefaultStrings) + self.ignoreFiles = list(map(re.compile, self.ignoreFilesDefaultStrings)) self.include = None self.loggingConfig = None self.logStream = sys.stderr @@ -247,7 +247,7 @@ d = self.__dict__.copy() # don't expose env, could include sensitive info d['env'] = {} - keys = [ k for k in d.keys() + keys = [ k for k in list(d.keys()) if not k.startswith('_') ] keys.sort() return "Config(%s)" % ', '.join([ '%s=%r' % (k, d[k]) @@ -328,17 +328,17 @@ self.testMatch = re.compile(options.testMatch) if options.ignoreFiles: - self.ignoreFiles = map(re.compile, tolist(options.ignoreFiles)) + self.ignoreFiles = list(map(re.compile, tolist(options.ignoreFiles))) log.info("Ignoring files matching %s", options.ignoreFiles) else: log.info("Ignoring files matching %s", self.ignoreFilesDefaultStrings) if options.include: - self.include = map(re.compile, tolist(options.include)) RefactoringTool: Refactored ./nose/core.py RefactoringTool: No changes to ./nose/exc.py RefactoringTool: Refactored ./nose/failure.py RefactoringTool: No changes to ./nose/importer.py RefactoringTool: Refactored ./nose/inspector.py RefactoringTool: Refactored ./nose/loader.py RefactoringTool: No changes to ./nose/proxy.py RefactoringTool: Refactored ./nose/pyversion.py + self.include = list(map(re.compile, tolist(options.include))) log.info("Including tests matching %s", options.include) if options.exclude: - self.exclude = map(re.compile, tolist(options.exclude)) + self.exclude = list(map(re.compile, tolist(options.exclude))) log.info("Excluding tests matching %s", options.exclude) # When listing plugins we don't want to run them @@ -623,15 +623,15 @@ def __getnewargs__(self): return () - def __nonzero__(self): + def __bool__(self): return False def user_config_files(): """Return path to any existing user config files """ - return filter(os.path.exists, - map(os.path.expanduser, config_files)) + return list(filter(os.path.exists, + list(map(os.path.expanduser, config_files)))) def all_config_files(): --- ./nose/core.py (original) +++ ./nose/core.py (refactored) @@ -1,6 +1,6 @@ """Implements nose test program and collector. """ -from __future__ import generators + import logging import os @@ -150,7 +150,7 @@ if self.config.options.version: from nose import __version__ sys.stdout = sys.__stdout__ - print "%s version %s" % (os.path.basename(sys.argv[0]), __version__) + print("%s version %s" % (os.path.basename(sys.argv[0]), __version__)) sys.exit(0) if self.config.options.showPlugins: @@ -224,26 +224,26 @@ v = self.config.verbosity self.config.plugins.sort() for p in self.config.plugins: - print "Plugin %s" % p.name + print("Plugin %s" % p.name) if v >= 2: - print " score: %s" % p.score - print '\n'.join(textwrap.wrap(p.help().strip(), + print(" score: %s" % p.score) + print('\n'.join(textwrap.wrap(p.help().strip(), initial_indent=' ', - subsequent_indent=' ')) + subsequent_indent=' '))) if v >= 3: parser = DummyParser() p.addOptions(parser) if len(parser.options): - print - print " Options:" + print() + print(" Options:") for opts, help in parser.options: - print ' %s' % (', '.join(opts)) + print(' %s' % (', '.join(opts))) if help: - print '\n'.join( + print('\n'.join( textwrap.wrap(help.strip(), initial_indent=' ', - subsequent_indent=' ')) - print + subsequent_indent=' '))) + print() def usage(cls): import nose --- ./nose/failure.py (original) +++ ./nose/failure.py (refactored) @@ -36,7 +36,7 @@ def runTest(self): if self.tb is not None: if is_base_exception(self.exc_val): - raise self.exc_val, None, self.tb - raise self.exc_class, self.exc_val, self.tb + raise self.exc_val.with_traceback(self.tb) + raise self.exc_class(self.exc_val).with_traceback(self.tb) else: raise self.exc_class(self.exc_val) --- ./nose/inspector.py (original) +++ ./nose/inspector.py (refactored) @@ -9,9 +9,9 @@ import tokenize try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO log = logging.getLogger(__name__) @@ -38,7 +38,7 @@ try: for tok in tokenize.generate_tokens(src.readline): exp(*tok) - except tokenize.TokenError, e: + except tokenize.TokenError as e: # this can happen if our inspectable region happens to butt up # against the end of a construct like a docstring with the closing # """ on separate line --- ./nose/loader.py (original) +++ ./nose/loader.py (refactored) @@ -6,7 +6,7 @@ superclass, unittest.TestLoader, but extends it by more liberal interpretations of what may be a test and how a test may be named. """ -from __future__ import generators + import logging import os @@ -113,7 +113,7 @@ return False return sel.wantMethod(item) - cases = filter(wanted, dir(testCaseClass)) + cases = list(filter(wanted, dir(testCaseClass))) # add runTest if nothing else picked if not cases and hasattr(testCaseClass, 'runTest'): @@ -224,7 +224,7 @@ # Plugins can yield False to indicate that they were # unable to load tests from a file, but it was not an # error -- the file just had no tests to load. - tests = filter(None, tests) + tests = [_f for _f in tests if _f] return self.suiteClass(tests) else: # Nothing was able to even try to load from this file @@ -274,7 +274,7 @@ # convert the unbound generator method # into a bound method so it can be called below if hasattr(generator, 'im_class'): - cls = generator.im_class + cls = generator.__self__.__class__ inst = cls() method = generator.__name__ generator = getattr(inst, method) @@ -329,8 +329,7 @@ test_funcs.append(test) sort_list(test_classes, lambda x: x.__name__) sort_list(test_funcs, func_lineno) - tests = map(lambda t: self.makeTest(t, parent=module), - test_classes + test_funcs) + tests = [self.makeTest(t, parent=module) for t in test_classes + test_funcs] # Now, descend into packages # FIXME can or should this be lazy? --- ./nose/pyversion.py (original) +++ ./nose/pyversion.py (refactored) @@ -16,12 +16,12 @@ # In Python 3.x, all strings are unicode (the call to 'unicode()' in the 2.x # source will be replaced with 'str()' when running 2to3, so this test will # then become true) -UNICODE_STRINGS = (type(unicode()) == type(str())) +UNICODE_STRINGS = (type(str()) == type(str())) if sys.version_info[:2] < (3, 0): def force_unicode(s, encoding='UTF-8'): try: - s = unicode(s) + s = str(s) except UnicodeDecodeError: s = str(s).decode(encoding, 'replace') @@ -35,7 +35,7 @@ try: import new def make_instancemethod(function, instance): - return new.instancemethod(function.im_func, instance, + return new.instancemethod(function.__func__, instance, instance.__class__) except ImportError: def make_instancemethod(function, instance): @@ -73,8 +73,8 @@ # thus types.ClassType and types.TypeType don't exist anymore. For # compatibility, we make sure they still work. if hasattr(types, 'ClassType'): - ClassType = types.ClassType - TypeType = types.TypeType + ClassType = type + TypeType = type else: ClassType = type TypeType = type @@ -90,7 +90,7 @@ self._func = func self.__self__ = UnboundSelf(cls) if sys.version_info < (3, 0): - self.im_class = cls + self.__self__.__class__ = cls self.__doc__ = getattr(func, '__doc__', None) def address(self): @@ -161,7 +161,7 @@ def isgenerator(func): try: - return func.func_code.co_flags & CO_GENERATOR != 0 + return func.__code__.co_flags & CO_GENERATOR != 0 except AttributeError: return False @@ -187,8 +187,8 @@ msg = force_unicode(msg, encoding=encoding) RefactoringTool: Refactored ./nose/result.py RefactoringTool: Refactored ./nose/selector.py RefactoringTool: Refactored ./nose/suite.py RefactoringTool: Refactored ./nose/twistedtools.py RefactoringTool: Refactored ./nose/util.py RefactoringTool: No changes to ./nose/ext/__init__.py RefactoringTool: Refactored ./nose/ext/dtcompat.py clsname = force_unicode(ev.__class__.__name__, encoding=encoding) - ev = u'%s: %s' % (clsname, msg) - elif not isinstance(ev, unicode): + ev = '%s: %s' % (clsname, msg) + elif not isinstance(ev, str): ev = repr(ev) return force_unicode(ev, encoding=encoding) --- ./nose/result.py (original) +++ ./nose/result.py (refactored) @@ -62,7 +62,7 @@ except TypeError: # 2.3 compat exc_info = self._exc_info_to_string(err) - for cls, (storage, label, isfail) in self.errorClasses.items(): + for cls, (storage, label, isfail) in list(self.errorClasses.items()): #if 'Skip' in cls.__name__ or 'Skip' in ec.__name__: # from nose.tools import set_trace # set_trace() @@ -101,7 +101,7 @@ """Overrides to print all errorClasses errors as well. """ _TextTestResult.printErrors(self) - for cls in self.errorClasses.keys(): + for cls in list(self.errorClasses.keys()): storage, label, isfail = self.errorClasses[cls] if isfail: self.printErrorList(label, storage) @@ -124,7 +124,7 @@ writeln() summary = {} - eckeys = self.errorClasses.keys() + eckeys = list(self.errorClasses.keys()) for cls in eckeys: storage, label, isfail = self.errorClasses[cls] count = len(storage) @@ -140,7 +140,7 @@ write("FAILED") else: write("OK") - items = summary.items() + items = list(summary.items()) if items: items.sort() write(" (") @@ -157,7 +157,7 @@ """ if self.errors or self.failures: return False - for cls in self.errorClasses.keys(): + for cls in list(self.errorClasses.keys()): storage, label, isfail = self.errorClasses[cls] if not isfail: continue --- ./nose/selector.py (original) +++ ./nose/selector.py (refactored) @@ -52,11 +52,9 @@ """ return ((self.match.search(name) or (self.include and - filter(None, - [inc.search(name) for inc in self.include]))) + [_f for _f in [inc.search(name) for inc in self.include] if _f])) and ((not self.exclude) - or not filter(None, - [exc.search(name) for exc in self.exclude]) + or not [_f for _f in [exc.search(name) for exc in self.exclude] if _f] )) def wantClass(self, cls): @@ -89,9 +87,7 @@ tail = op_basename(dirname) if ispackage(dirname): wanted = (not self.exclude - or not filter(None, - [exc.search(tail) for exc in self.exclude] - )) + or not [_f for _f in [exc.search(tail) for exc in self.exclude] if _f]) else: wanted = (self.matches(tail) or (self.config.srcDirs --- ./nose/suite.py (original) +++ ./nose/suite.py (refactored) @@ -7,7 +7,7 @@ functions or methods) for the context that contains its tests. """ -from __future__ import generators + import logging import sys @@ -75,14 +75,14 @@ test(result) return result - def __nonzero__(self): + def __bool__(self): log.debug("tests in %s?", id(self)) if self._precache: return True if self.test_generator is None: return False try: - test = self.test_generator.next() + test = next(self.test_generator) if test is not None: self._precache.append(test) return True @@ -439,7 +439,7 @@ # don't want that, instead want the module the class is in now # (classes are re-ancestored elsewhere). if hasattr(context, 'im_class'): - context = context.im_class + context = context.__self__.__class__ elif hasattr(context, '__self__'): context = context.__self__.__class__ if hasattr(context, '__module__'): --- ./nose/twistedtools.py (original) +++ ./nose/twistedtools.py (refactored) @@ -29,7 +29,7 @@ """ import sys -from Queue import Queue, Empty +from queue import Queue, Empty from nose.tools import make_decorator, TimeExpired __all__ = [ @@ -166,7 +166,7 @@ # Re-raise all exceptions if error is not None: exc_type, exc_value, tb = error - raise exc_type, exc_value, tb + raise exc_type(exc_value).with_traceback(tb) wrapper = make_decorator(func)(wrapper) return wrapper return decorate --- ./nose/util.py (original) +++ ./nose/util.py (refactored) @@ -151,7 +151,7 @@ return func.compat_co_firstlineno except AttributeError: try: - return func.func_code.co_firstlineno + return func.__code__.co_firstlineno except AttributeError: return -1 @@ -400,7 +400,7 @@ file = getattr(test, '__file__', None) module = getattr(test, '__name__', None) return (src(file), module, call) - if t == types.FunctionType or issubclass(t, type) or t == types.ClassType: + if t == types.FunctionType or issubclass(t, type) or t == type: module = getattr(test, '__module__', None) if module is not None: m = sys.modules[module] @@ -410,7 +410,7 @@ call = getattr(test, '__name__', None) return (src(file), module, call) if t == types.MethodType: - cls_adr = test_address(test.im_class) + cls_adr = test_address(test.__self__.__class__) return (src(cls_adr[0]), cls_adr[1], "%s.%s" % (cls_adr[2], test.__name__)) # handle unittest.TestCase instances @@ -552,7 +552,7 @@ self._keys.append(key) def __str__(self): - return "{%s}" % ', '.join(["%r: %r" % (k, v) for k, v in self.items()]) + return "{%s}" % ', '.join(["%r: %r" % (k, v) for k, v in list(self.items())]) def clear(self): super(odict, self).clear() @@ -564,7 +564,7 @@ return d def items(self): - return zip(self._keys, self.values()) + return list(zip(self._keys, list(self.values()))) def keys(self): return self._keys[:] @@ -577,12 +577,12 @@ def update(self, dict): super(odict, self).update(dict) - for key in dict.keys(): + for key in list(dict.keys()): if key not in self._keys: self._keys.append(key) def values(self): - return map(self.get, self._keys) + return list(map(self.get, self._keys)) def transplant_func(func, module): @@ -653,7 +653,7 @@ if isinstance(val, Exception): return ' '.join([safe_str(arg, encoding) for arg in val]) - return unicode(val).encode(encoding) + return str(val).encode(encoding) def is_executable(file): --- ./nose/ext/dtcompat.py (original) +++ ./nose/ext/dtcompat.py (refactored) @@ -104,7 +104,7 @@ import sys, traceback, inspect, linecache, os, re import unittest, difflib, pdb, tempfile import warnings -from StringIO import StringIO +from io import StringIO # Don't whine about the deprecated is_private function in this # module's tests. @@ -219,7 +219,7 @@ """ if inspect.ismodule(module): return module - elif isinstance(module, (str, unicode)): + elif isinstance(module, str): return __import__(module, globals(), locals(), ["*"]) elif module is None: return sys.modules[sys._getframe(depth).f_globals['__name__']] @@ -341,9 +341,9 @@ # [XX] Normalize with respect to os.path.pardir? def _module_relative_path(module, path): if not inspect.ismodule(module): - raise TypeError, 'Expected a module: %r' % module + raise TypeError('Expected a module: %r' % module) if path.startswith('/'): - raise ValueError, 'Module-relative files may not have absolute paths' + raise ValueError('Module-relative files may not have absolute paths') # Find the base directory for the path. if hasattr(module, '__file__'): @@ -457,7 +457,7 @@ Create a new DocTest containing the given examples. The DocTest's globals are initialized with a copy of `globs`. """ - assert not isinstance(examples, basestring), \ + assert not isinstance(examples, str), \ "DocTest no longer accepts str; use DocTestParser instead" self.examples = examples self.docstring = docstring @@ -856,7 +856,7 @@ if module is None: return True elif inspect.isfunction(object): - return module.__dict__ is object.func_globals + return module.__dict__ is object.__globals__ elif inspect.isclass(object): # Some jython classes don't set __module__ return module.__name__ == getattr(object, '__module__', None) @@ -875,7 +875,7 @@ add them to `tests`. """ if self._verbose: - print 'Finding tests in %s' % name + print('Finding tests in %s' % name) # If we've already processed this object, then ignore it. if id(obj) in seen: @@ -889,7 +889,7 @@ # Look for tests in a module's contained objects. if inspect.ismodule(obj) and self._recurse: - for valname, val in obj.__dict__.items(): + for valname, val in list(obj.__dict__.items()): # Check if this contained object should be ignored. if self._filter(val, name, valname): continue @@ -902,14 +902,14 @@ # Look for tests in a module's __test__ dictionary. if inspect.ismodule(obj) and self._recurse: - for valname, val in getattr(obj, '__test__', {}).items(): - if not isinstance(valname, basestring): + for valname, val in list(getattr(obj, '__test__', {}).items()): + if not isinstance(valname, str): raise ValueError("DocTestFinder.find: __test__ keys " "must be strings: %r" % (type(valname),)) if not (inspect.isfunction(val) or inspect.isclass(val) or inspect.ismethod(val) or inspect.ismodule(val) or - isinstance(val, basestring)): + isinstance(val, str)): raise ValueError("DocTestFinder.find: __test__ values " "must be strings, functions, methods, " "classes, or modules: %r" % @@ -920,7 +920,7 @@ # Look for tests in a class's contained objects. if inspect.isclass(obj) and self._recurse: - for valname, val in obj.__dict__.items(): + for valname, val in list(obj.__dict__.items()): # Check if this contained object should be ignored. if self._filter(val, name, valname): continue @@ -928,7 +928,7 @@ if isinstance(val, staticmethod): val = getattr(obj, valname) if isinstance(val, classmethod): - val = getattr(obj, valname).im_func + val = getattr(obj, valname).__func__ # Recurse to methods, properties, and nested classes. if ((inspect.isfunction(val) or inspect.isclass(val) or @@ -945,7 +945,7 @@ """ # Extract the object's docstring. If it doesn't have one, # then return None (no test for this object). - if isinstance(obj, basestring): + if isinstance(obj, str): docstring = obj else: try: @@ -953,7 +953,7 @@ docstring = '' else: docstring = obj.__doc__ - if not isinstance(docstring, basestring): + if not isinstance(docstring, str): docstring = str(docstring) except (TypeError, AttributeError): docstring = '' @@ -1003,8 +1003,8 @@ break # Find the line number for functions & methods. - if inspect.ismethod(obj): obj = obj.im_func - if inspect.isfunction(obj): obj = obj.func_code + if inspect.ismethod(obj): obj = obj.__func__ + if inspect.isfunction(obj): obj = obj.__code__ if inspect.istraceback(obj): obj = obj.tb_frame if inspect.isframe(obj): obj = obj.f_code if inspect.iscode(obj): @@ -1143,7 +1143,7 @@ # to modify them). original_optionflags = self.optionflags - SUCCESS, FAILURE, BOOM = range(3) # `outcome` state + SUCCESS, FAILURE, BOOM = list(range(3)) # `outcome` state check = self._checker.check_output @@ -1158,7 +1158,7 @@ # Merge in the example's options. self.optionflags = original_optionflags if example.options: - for (optionflag, val) in example.options.items(): + for (optionflag, val) in list(example.options.items()): if val: self.optionflags |= optionflag else: @@ -1179,8 +1179,8 @@ # keyboard interrupts.) try: # Don't blink! This is where the user's code gets run. - exec compile(example.source, filename, "single", - compileflags, 1) in test.globs + exec(compile(example.source, filename, "single", + compileflags, 1), test.globs) self.debugger.set_continue() # ==== Example Finished ==== exception = None except KeyboardInterrupt: @@ -1341,7 +1341,7 @@ passed = [] failed = [] totalt = totalf = 0 - for x in self._name2ft.items(): + for x in list(self._name2ft.items()): name, (f, t) = x assert f <= t totalt += t @@ -1354,28 +1354,28 @@ failed.append(x) if verbose: if notests: - print len(notests), "items had no tests:" + print(len(notests), "items had no tests:") notests.sort() for thing in notests: - print " ", thing + print(" ", thing) if passed: - print len(passed), "items passed all tests:" + print(len(passed), "items passed all tests:") passed.sort() for thing, count in passed: - print " %3d tests in %s" % (count, thing) + print(" %3d tests in %s" % (count, thing)) if failed: - print self.DIVIDER - print len(failed), "items had failures:" + print(self.DIVIDER) + print(len(failed), "items had failures:") failed.sort() for thing, (f, t) in failed: - print " %3d of %3d in %s" % (f, t, thing) + print(" %3d of %3d in %s" % (f, t, thing)) if verbose: - print totalt, "tests in", len(self._name2ft), "items." - print totalt - totalf, "passed and", totalf, "failed." + print(totalt, "tests in", len(self._name2ft), "items.") + print(totalt - totalf, "passed and", totalf, "failed.") if totalf: - print "***Test Failed***", totalf, "failures." + print("***Test Failed***", totalf, "failures.") elif verbose: - print "Test passed." + print("Test passed.") return totalf, totalt #///////////////////////////////////////////////////////////////// @@ -1383,10 +1383,10 @@ RefactoringTool: No changes to ./nose/plugins/__init__.py RefactoringTool: No changes to ./nose/plugins/allmodules.py RefactoringTool: Refactored ./nose/plugins/attrib.py RefactoringTool: Refactored ./nose/plugins/base.py RefactoringTool: No changes to ./nose/plugins/builtin.py RefactoringTool: Refactored ./nose/plugins/capture.py RefactoringTool: No changes to ./nose/plugins/collect.py RefactoringTool: Refactored ./nose/plugins/cover.py RefactoringTool: No changes to ./nose/plugins/debug.py RefactoringTool: No changes to ./nose/plugins/deprecated.py RefactoringTool: Refactored ./nose/plugins/doctests.py #///////////////////////////////////////////////////////////////// def merge(self, other): d = self._name2ft - for name, (f, t) in other._name2ft.items(): + for name, (f, t) in list(other._name2ft.items()): if name in d: - print "*** DocTestRunner.merge: '" + name + "' in both" \ - " testers; summing outcomes." + print("*** DocTestRunner.merge: '" + name + "' in both" \ + " testers; summing outcomes.") f2, t2 = d[name] f = f + f2 t = t + t2 @@ -1875,10 +1875,10 @@ def runstring(self, s, name): test = DocTestParser().get_doctest(s, self.globs, name, None, None) if self.verbose: - print "Running string", name + print("Running string", name) (f,t) = self.testrunner.run(test) if self.verbose: - print f, "of", t, "examples failed in string", name + print(f, "of", t, "examples failed in string", name) return (f,t) def rundoc(self, object, name=None, module=None): @@ -2245,9 +2245,9 @@ if pm: try: - execfile(srcfilename, globs, globs) + exec(compile(open(srcfilename, "rb").read(), srcfilename, 'exec'), globs, globs) except: - print sys.exc_info()[1] + print(sys.exc_info()[1]) pdb.post_mortem(sys.exc_info()[2]) else: # Note that %r is vital here. '%s' instead can, e.g., cause --- ./nose/plugins/attrib.py (original) +++ ./nose/plugins/attrib.py (refactored) @@ -118,7 +118,7 @@ def wrap_ob(ob): for name in args: setattr(ob, name, True) - for name, value in kwargs.iteritems(): + for name, value in kwargs.items(): setattr(ob, name, value) return ob return wrap_ob @@ -280,7 +280,7 @@ """Accept the method if its attributes match. """ try: - cls = method.im_class + cls = method.__self__.__class__ except AttributeError: return False return self.validateAttrib(method, cls) --- ./nose/plugins/base.py (original) +++ ./nose/plugins/base.py (refactored) @@ -67,7 +67,7 @@ try: self.options(parser, env) self.can_configure = True - except OptionConflictError, e: + except OptionConflictError as e: warn("Plugin %s has conflicting option string: %s and will " "be disabled" % (self, e), RuntimeWarning) self.enabled = False --- ./nose/plugins/capture.py (original) +++ ./nose/plugins/capture.py (refactored) @@ -15,7 +15,7 @@ from nose.plugins.base import Plugin from nose.pyversion import exc_to_unicode, force_unicode from nose.util import ln -from StringIO import StringIO +from io import StringIO log = logging.getLogger(__name__) @@ -89,8 +89,8 @@ def addCaptureToErr(self, ev, output): ev = exc_to_unicode(ev) output = force_unicode(output) - return u'\n'.join([ev, ln(u'>> begin captured stdout <<'), - output, ln(u'>> end captured stdout <<')]) + return '\n'.join([ev, ln('>> begin captured stdout <<'), + output, ln('>> end captured stdout <<')]) def start(self): self.stdout.append(sys.stdout) --- ./nose/plugins/cover.py (original) +++ ./nose/plugins/cover.py (refactored) @@ -13,7 +13,7 @@ import logging import re import sys -import StringIO +import io from nose.plugins.base import Plugin from nose.util import src, tolist @@ -145,7 +145,7 @@ self.coverInstance.exclude('#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]') log.debug("Coverage begin") - self.skipModules = sys.modules.keys()[:] + self.skipModules = list(sys.modules.keys())[:] if self.coverErase: log.debug("Clearing previously collected coverage statistics") self.coverInstance.combine() @@ -184,7 +184,7 @@ self.coverInstance.combine() self.coverInstance.save() modules = [module - for name, module in sys.modules.items() + for name, module in list(sys.modules.items()) if self.wantModuleCoverage(name, module)] log.debug("Coverage report will cover modules: %s", modules) self.coverInstance.report(modules, file=stream) @@ -194,19 +194,19 @@ log.debug("Generating HTML coverage report") try: self.coverInstance.html_report(modules, self.coverHtmlDir) - except coverage.misc.CoverageException, e: + except coverage.misc.CoverageException as e: log.warning("Failed to generate HTML report: %s" % str(e)) if self.coverXmlFile: log.debug("Generating XML coverage report") try: self.coverInstance.xml_report(modules, self.coverXmlFile) - except coverage.misc.CoverageException, e: + except coverage.misc.CoverageException as e: log.warning("Failed to generate XML report: %s" % str(e)) # make sure we have minimum required coverage if self.coverMinPercentage: - f = StringIO.StringIO() + f = io.StringIO() self.coverInstance.report(modules, file=f) multiPackageRe = (r'-------\s\w+\s+\d+\s+\d+(?:\s+\d+\s+\d+)?' --- ./nose/plugins/doctests.py (original) +++ ./nose/plugins/doctests.py (refactored) @@ -47,7 +47,7 @@ additional documentation and examples. """ -from __future__ import generators + import logging import os @@ -59,11 +59,11 @@ from nose.util import anyp, getpackage, test_address, resolve_name, \ src, tolist, isproperty try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO import sys -import __builtin__ as builtin_mod +import builtins as builtin_mod log = logging.getLogger(__name__) @@ -275,7 +275,7 @@ try: fixture_context = __import__( fixt_mod, globals(), locals(), ["nop"]) - except ImportError, e: + except ImportError as e: log.debug( "Could not import %s: %s (%s)", fixt_mod, e, sys.path) log.debug("Fixture module %s resolved to %s", @@ -321,13 +321,11 @@ # FIXME don't think we need include/exclude checks here? return ((self.doctest_tests or not self.conf.testMatch.search(name) or (self.conf.include - and filter(None, - [inc.search(name) - for inc in self.conf.include]))) + and [_f for _f in [inc.search(name) + for inc in self.conf.include] if _f])) and (not self.conf.exclude - or not filter(None, - [exc.search(name) - for exc in self.conf.exclude]))) + or not [_f for _f in [exc.search(name) + for exc in self.conf.exclude] if _f])) def wantFile(self, file): """Override to select all modules and any file ending with @@ -340,9 +338,8 @@ if (self.extension and anyp(file.endswith, self.extension) and (not self.conf.exclude - or not filter(None, - [exc.search(file) - for exc in self.conf.exclude]))): + or not [_f for _f in [exc.search(file) + for exc in self.conf.exclude] if _f])): return True return None @@ -413,7 +410,7 @@ if value is None: return setattr(builtin_mod, self._result_var, value) RefactoringTool: Refactored ./nose/plugins/errorclass.py RefactoringTool: No changes to ./nose/plugins/failuredetail.py RefactoringTool: Refactored ./nose/plugins/isolate.py RefactoringTool: Refactored ./nose/plugins/logcapture.py RefactoringTool: Refactored ./nose/plugins/manager.py RefactoringTool: Refactored ./nose/plugins/multiprocess.py RefactoringTool: Refactored ./nose/plugins/plugintest.py RefactoringTool: No changes to ./nose/plugins/prof.py RefactoringTool: No changes to ./nose/plugins/skip.py RefactoringTool: Refactored ./nose/plugins/testid.py - print repr(value) + print(repr(value)) def tearDown(self): super(DocTestCase, self).tearDown() @@ -446,7 +443,7 @@ if value is None: return setattr(builtin_mod, self._result_var, value) - print repr(value) + print(repr(value)) def tearDown(self): super(DocFileCase, self).tearDown() --- ./nose/plugins/errorclass.py (original) +++ ./nose/plugins/errorclass.py (refactored) @@ -103,7 +103,7 @@ """ def __init__(self, name, bases, attr): errorClasses = [] - for name, detail in attr.items(): + for name, detail in list(attr.items()): if isinstance(detail, ErrorClass): attr.pop(name) for cls in detail: @@ -127,12 +127,11 @@ return iter(self.errorClasses) -class ErrorClassPlugin(Plugin): +class ErrorClassPlugin(Plugin, metaclass=MetaErrorClass): """ Base class for ErrorClass plugins. Subclass this class and declare the exceptions that you wish to handle as attributes of the subclass. """ - __metaclass__ = MetaErrorClass score = 1000 errorClasses = () @@ -141,7 +140,7 @@ if not isclass(err_cls): return classes = [e[0] for e in self.errorClasses] - if filter(lambda c: issubclass(err_cls, c), classes): + if [c for c in classes if issubclass(err_cls, c)]: return True def prepareTestResult(self, result): --- ./nose/plugins/isolate.py (original) +++ ./nose/plugins/isolate.py (refactored) @@ -72,7 +72,7 @@ it was in when mod stack was pushed. """ mods = self._mod_stack.pop() - to_del = [ m for m in sys.modules.keys() if m not in mods ] + to_del = [ m for m in list(sys.modules.keys()) if m not in mods ] if to_del: log.debug('removing sys modules entries: %s', to_del) for mod in to_del: --- ./nose/plugins/logcapture.py (original) +++ ./nose/plugins/logcapture.py (refactored) @@ -23,9 +23,9 @@ from nose.util import anyp, ln, safe_str try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO log = logging.getLogger(__name__) @@ -57,7 +57,7 @@ any item in `matchers`""" def record_matches_key(key): return record == key or record.startswith(key + '.') - return anyp(bool, map(record_matches_key, matchers)) + return anyp(bool, list(map(record_matches_key, matchers))) _any_match = staticmethod(_any_match) def _allow(self, record): @@ -180,7 +180,7 @@ if hasattr(root_logger, "handlers"): for handler in root_logger.handlers: root_logger.removeHandler(handler) - for logger in logging.Logger.manager.loggerDict.values(): + for logger in list(logging.Logger.manager.loggerDict.values()): if hasattr(logger, "handlers"): for handler in logger.handlers: logger.removeHandler(handler) @@ -237,7 +237,7 @@ return (ec, self.addCaptureToErr(ev, records), tb) def formatLogRecords(self): - return map(safe_str, self.handler.buffer) + return list(map(safe_str, self.handler.buffer)) def addCaptureToErr(self, ev, records): return '\n'.join([safe_str(ev), ln('>> begin captured logging <<')] + \ --- ./nose/plugins/manager.py (original) +++ ./nose/plugins/manager.py (refactored) @@ -60,13 +60,13 @@ from nose.pyversion import sort_list try: - import cPickle as pickle + import pickle as pickle except: import pickle try: - from cStringIO import StringIO + from io import StringIO except: - from StringIO import StringIO + from io import StringIO __all__ = ['DefaultPluginManager', 'PluginManager', 'EntryPointPluginManager', @@ -387,7 +387,7 @@ plugcls = ep.load() except KeyboardInterrupt: raise - except Exception, e: + except Exception as e: # never want a plugin load to kill the test run # but we can't log here because the logger is not yet # configured --- ./nose/plugins/multiprocess.py (original) +++ ./nose/plugins/multiprocess.py (refactored) @@ -115,12 +115,12 @@ from unittest.runner import _WritelnDecorator except ImportError: from unittest import _WritelnDecorator -from Queue import Empty +from queue import Empty from warnings import warn try: - from cStringIO import StringIO + from io import StringIO except ImportError: - import StringIO + import io # this is a list of plugin classes that will be checked for and created inside # each worker process @@ -478,7 +478,7 @@ self.config.multiprocess_timeout-timeprocessing) log.debug("Completed %s tasks (%s remain)", len(completed), len(tasks)) - except (KeyboardInterrupt, SystemExit), e: + except (KeyboardInterrupt, SystemExit) as e: log.info('parent received ctrl-c when waiting for test results') thrownError = e #resultQueue.get(False) @@ -633,7 +633,7 @@ result.testsRun += testsRun result.failures.extend(failures) result.errors.extend(errors) - for key, (storage, label, isfail) in errorClasses.items(): + for key, (storage, label, isfail) in list(errorClasses.items()): if key not in result.errorClasses: # Ordinarily storage is result attribute # but it's only processed through the errorClasses @@ -688,7 +688,7 @@ failures = [(TestLet(c), err) for c, err in result.failures] errors = [(TestLet(c), err) for c, err in result.errors] errorClasses = {} - for key, (storage, label, isfail) in result.errorClasses.items(): + for key, (storage, label, isfail) in list(result.errorClasses.items()): errorClasses[key] = ([(TestLet(c), err) for c, err in storage], label, isfail) return ( @@ -715,7 +715,7 @@ test(result) currentaddr.value = bytes_('') resultQueue.put((ix, test_addr, test.tasks, batch(result))) - except KeyboardInterrupt, e: #TimedOutException: + except KeyboardInterrupt as e: #TimedOutException: timeout = isinstance(e, TimedOutException) if timeout: keyboardCaught.set() @@ -810,7 +810,7 @@ #log.debug('running test %s in suite %s', test, self); try: test(orig) - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: timeout = isinstance(e, TimedOutException) if timeout: msg = 'Timeout when running test %s in suite %s' --- ./nose/plugins/plugintest.py (original) +++ ./nose/plugins/plugintest.py (refactored) @@ -100,9 +100,9 @@ from warnings import warn try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO __all__ = ['PluginTester', 'run'] @@ -135,7 +135,7 @@ if getpid() != self.__master: return - from Queue import Empty + from queue import Empty from collections import defaultdict cache = defaultdict(str) while True: @@ -404,7 +404,7 @@ sys.stderr = stderr sys.stdout = stdout out = buffer.getvalue() - print munge_nose_output_for_doctest(out) + print(munge_nose_output_for_doctest(out)) def run_buffered(*arg, **kw): --- ./nose/plugins/testid.py (original) +++ ./nose/plugins/testid.py (refactored) @@ -100,7 +100,7 @@ from nose.util import src, set try: - from cPickle import dump, load + from pickle import dump, load except ImportError: from pickle import dump, load RefactoringTool: Refactored ./nose/plugins/xunit.py RefactoringTool: No changes to ./nose/sphinx/pluginopts.py RefactoringTool: No changes to ./nose/tools/__init__.py RefactoringTool: Refactored ./nose/tools/nontrivial.py RefactoringTool: No changes to ./nose/tools/trivial.py RefactoringTool: No changes to ./unit_tests/helpers.py RefactoringTool: Refactored ./unit_tests/mock.py RefactoringTool: No changes to ./unit_tests/test_attribute_plugin.py RefactoringTool: Refactored ./unit_tests/test_bug105.py RefactoringTool: Refactored ./unit_tests/test_capture_plugin.py RefactoringTool: Refactored ./unit_tests/test_cases.py @@ -198,7 +198,7 @@ self.ids, self.tests, self.failed, self.source_names, self.idfile) fh.close() - except ValueError, e: + except ValueError as e: # load() may throw a ValueError when reading the ids file, if it # was generated with a newer version of Python than we are currently # running. --- ./nose/plugins/xunit.py (original) +++ ./nose/plugins/xunit.py (refactored) @@ -46,7 +46,7 @@ import traceback import re import inspect -from StringIO import StringIO +from io import StringIO from time import time from xml.sax import saxutils @@ -110,7 +110,7 @@ result = str(exc) except UnicodeEncodeError: try: - result = unicode(exc) + result = str(exc) except UnicodeError: # Fallback to args as neither str nor # unicode(Exception(u'\xe6')) work in Python < 2.6 @@ -213,13 +213,13 @@ self.stats['total'] = (self.stats['errors'] + self.stats['failures'] + self.stats['passes'] + self.stats['skipped']) self.error_report_file.write( - u'' - u'' % self.stats) - self.error_report_file.write(u''.join([force_unicode(e, self.encoding) + '' + '' % self.stats) + self.error_report_file.write(''.join([force_unicode(e, self.encoding) for e in self.errorlist])) - self.error_report_file.write(u'') + self.error_report_file.write('') self.error_report_file.close() if self.config.verbosity > 1: stream.writeln("-" * 70) @@ -288,9 +288,9 @@ id = test.id() self.errorlist.append( - u'' - u'<%(type)s type=%(errtype)s message=%(message)s>' - u'%(systemout)s%(systemerr)s' % + '' + '<%(type)s type=%(errtype)s message=%(message)s>' + '%(systemout)s%(systemerr)s' % {'cls': self._quoteattr(id_split(id)[0]), 'name': self._quoteattr(id_split(id)[-1]), 'taken': taken, @@ -311,9 +311,9 @@ id = test.id() self.errorlist.append( - u'' - u'' - u'%(systemout)s%(systemerr)s' % + '' + '' + '%(systemout)s%(systemerr)s' % {'cls': self._quoteattr(id_split(id)[0]), 'name': self._quoteattr(id_split(id)[-1]), 'taken': taken, --- ./nose/tools/nontrivial.py (original) +++ ./nose/tools/nontrivial.py (refactored) @@ -26,7 +26,7 @@ newfunc.__doc__ = func.__doc__ newfunc.__module__ = func.__module__ if not hasattr(newfunc, 'compat_co_firstlineno'): - newfunc.compat_co_firstlineno = func.func_code.co_firstlineno + newfunc.compat_co_firstlineno = func.__code__.co_firstlineno try: newfunc.__name__ = name except TypeError: --- ./unit_tests/mock.py (original) +++ ./unit_tests/mock.py (refactored) @@ -28,27 +28,27 @@ self.assertMyTest(test) self.called.append(('beforeTest', test)) def startTest(self, test): - print "proxy startTest" + print("proxy startTest") self.assertMyTest(test) self.called.append(('startTest', test)) def stopTest(self, test): - print "proxy stopTest" + print("proxy stopTest") self.assertMyTest(test) self.called.append(('stopTest', test)) def addDeprecated(self, test, err): - print "proxy addDeprecated" + print("proxy addDeprecated") self.assertMyTest(test) self.called.append(('addDeprecated', test, err)) def addError(self, test, err): - print "proxy addError" + print("proxy addError") self.assertMyTest(test) self.called.append(('addError', test, err)) def addFailure(self, test, err): - print "proxy addFailure" + print("proxy addFailure") self.assertMyTest(test) self.called.append(('addFailure', test, err)) def addSkip(self, test, err): - print "proxy addSkip" + print("proxy addSkip") self.assertMyTest(test) self.called.append(('addSkip', test, err)) def addSuccess(self, test): @@ -72,7 +72,7 @@ self.called = odict() def calls(self): - return self.called.keys() + return list(self.called.keys()) class RecordingPluginProxy(object): @@ -92,7 +92,7 @@ self.__dict__['d'].update(kw) def __getattr__(self, attr): - if not self.__dict__.has_key('d'): + if 'd' not in self.__dict__: return None return self.__dict__['d'].get(attr) --- ./unit_tests/test_bug105.py (original) +++ ./unit_tests/test_bug105.py (refactored) @@ -10,8 +10,8 @@ 'support', 'bug105')) l = TestLoader() - testmod = l.loadTestsFromDir(where).next() - print testmod + testmod = next(l.loadTestsFromDir(where)) + print(testmod) testmod.setUp() def fix(t): @@ -20,8 +20,8 @@ return s[s.index(': ')+2:] return s - tests = map(fix, testmod) - print tests + tests = list(map(fix, testmod)) + print(tests) self.assertEqual(tests, ['tests.test_z', 'tests.test_a', 'tests.test_dz', 'tests.test_mdz', 'tests.test_b']) --- ./unit_tests/test_capture_plugin.py (original) +++ ./unit_tests/test_capture_plugin.py (refactored) @@ -51,14 +51,14 @@ def test_captures_stdout(self): c = Capture() c.start() - print "Hello" + print("Hello") c.end() self.assertEqual(c.buffer, "Hello\n") def test_captures_nonascii_stdout(self): c = Capture() c.start() - print "test 日本" + print("test 日本") c.end() self.assertEqual(c.buffer, "test 日本\n") @@ -69,7 +69,7 @@ c = Capture() c.start() try: - print "Oh my!" + print("Oh my!") raise Exception("boom") except: err = sys.exc_info() @@ -90,8 +90,8 @@ c = Capture() c.start() try: - print "debug 日本" - raise AssertionError(u'response does not contain 名') + print("debug 日本") + raise AssertionError('response does not contain 名') except: err = sys.exc_info() formatted = c.formatError(d, err) --- ./unit_tests/test_cases.py (original) +++ ./unit_tests/test_cases.py (refactored) @@ -40,8 +40,7 @@ def __new__(cls, name, bases, dct): return type.__new__(cls, name, bases, dct) a = [] - class TestClass(object): - __metaclass__ = TestType + class TestClass(object, metaclass=TestType): def test_func(self, a=a): a.append(1) @@ -124,13 +123,13 @@ class TC(unittest.TestCase): RefactoringTool: No changes to ./unit_tests/test_config.py RefactoringTool: Refactored ./unit_tests/test_core.py RefactoringTool: No changes to ./unit_tests/test_cover_plugin.py RefactoringTool: Refactored ./unit_tests/test_deprecated_plugin.py RefactoringTool: No changes to ./unit_tests/test_doctest_error_handling.py RefactoringTool: No changes to ./unit_tests/test_doctest_no_name.py RefactoringTool: Refactored ./unit_tests/test_id_plugin.py RefactoringTool: No changes to ./unit_tests/test_importer.py RefactoringTool: Refactored ./unit_tests/test_inspector.py RefactoringTool: Refactored ./unit_tests/test_issue135.py RefactoringTool: No changes to ./unit_tests/test_issue270_fixtures.py RefactoringTool: Refactored ./unit_tests/test_issue_006.py RefactoringTool: No changes to ./unit_tests/test_issue_065.py RefactoringTool: No changes to ./unit_tests/test_issue_101.py RefactoringTool: Refactored ./unit_tests/test_issue_227.py RefactoringTool: Refactored ./unit_tests/test_issue_230.py RefactoringTool: No changes to ./unit_tests/test_lazy_suite.py RefactoringTool: Refactored ./unit_tests/test_loader.py def setUp(self): - print "TC setUp %s" % self + print("TC setUp %s" % self) called.append('setUp') def runTest(self): - print "TC runTest %s" % self + print("TC runTest %s" % self) called.append('runTest') def tearDown(self): - print "TC tearDown %s" % self + print("TC tearDown %s" % self) called.append('tearDown') case = nose.case.Test(TC()) --- ./unit_tests/test_core.py (original) +++ ./unit_tests/test_core.py (refactored) @@ -1,7 +1,7 @@ import os import sys import unittest -from cStringIO import StringIO +from io import StringIO from optparse import OptionParser import nose.core from nose.config import Config, all_config_files @@ -16,16 +16,16 @@ class TestAPI_run(unittest.TestCase): def test_restore_stdout(self): - print "AHOY" + print("AHOY") s = StringIO() - print s + print(s) stdout = sys.stdout conf = Config(stream=s) # set_trace() - print "About to run" + print("About to run") res = nose.core.run( testLoader=NullLoader(), argv=['test_run'], env={}, config=conf) - print "Done running" + print("Done running") stdout_after = sys.stdout self.assertEqual(stdout, stdout_after) --- ./unit_tests/test_deprecated_plugin.py (original) +++ ./unit_tests/test_deprecated_plugin.py (refactored) @@ -2,7 +2,7 @@ from nose.config import Config from nose.plugins.deprecated import Deprecated, DeprecatedTest from nose.result import TextTestResult, _TextTestResult -from StringIO import StringIO +from io import StringIO from optparse import OptionParser try: # 2.7+ @@ -107,7 +107,7 @@ res.printErrors() out = stream.getvalue() - print out + print(out) assert out assert ' ... DEPRECATED' in out --- ./unit_tests/test_id_plugin.py (original) +++ ./unit_tests/test_id_plugin.py (refactored) @@ -11,7 +11,7 @@ opt = mock.Bucket() opt.testIdFile = '.noseids' tid.configure(opt, c) - print tid.idfile + print(tid.idfile) assert tid.idfile.startswith(c.workingDir), \ "%s is not under %s" % (tid.idfile, c.workingDir) --- ./unit_tests/test_inspector.py (original) +++ ./unit_tests/test_inspector.py (refactored) @@ -6,9 +6,9 @@ import unittest try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO from nose.inspector import inspect_traceback, Expander, tbsource @@ -52,7 +52,7 @@ def test_get_tb_source_func(self): # func frame def check_even(n): - print n + print(n) assert n % 2 == 0 try: check_even(1) @@ -108,14 +108,14 @@ S = {'setup':1} def check_even(n, nn): assert S['setup'] - print n, nn + print(n, nn) assert n % 2 == 0 or nn % 2 == 0 try: check_even(1, 3) except AssertionError: et, ev, tb = sys.exc_info() out = inspect_traceback(tb) - print "'%s'" % out.strip() + print("'%s'" % out.strip()) if sys.version_info < (3,): print_line = " print 1, 3\n" else: @@ -136,7 +136,7 @@ except AssertionError: et, ev, tb = sys.exc_info() out = inspect_traceback(tb) - print "'%s'" % out.strip() + print("'%s'" % out.strip()) self.assertEqual(out.strip(), "2 = 2\n" ">> assert 2 == 4") --- ./unit_tests/test_issue135.py (original) +++ ./unit_tests/test_issue135.py (refactored) @@ -4,7 +4,7 @@ import sys import re try: - from StringIO import StringIO + from io import StringIO except ImportError: from io import BytesIO as StringIO --- ./unit_tests/test_issue_006.py (original) +++ ./unit_tests/test_issue_006.py (refactored) @@ -9,11 +9,11 @@ where = os.path.abspath(os.path.join(os.path.dirname(__file__), 'support', 'issue006')) l = TestLoader() - testmod = iter(l.loadTestsFromName(where)).next() - print testmod + testmod = next(iter(l.loadTestsFromName(where))) + print(testmod) testmod.setUp() - testcase = iter(testmod).next() + testcase = next(iter(testmod)) expect = [ ['tests.Test1.test_nested_generator'], ['tests.Test1.test_nested_generator_mult(1,)', @@ -23,8 +23,8 @@ 'tests.Test1.test_normal_generator(2,)'] ] for test in testcase: - tests = map(str, test) - print tests + tests = list(map(str, test)) + print(tests) self.assertEqual(tests, expect.pop(0)) if __name__ == '__main__': --- ./unit_tests/test_issue_227.py (original) +++ ./unit_tests/test_issue_227.py (refactored) @@ -9,4 +9,4 @@ def test_unicode(): - print u'b\u00f6y' + print('b\u00f6y') --- ./unit_tests/test_issue_230.py (original) +++ ./unit_tests/test_issue_230.py (refactored) @@ -13,7 +13,7 @@ loader = TestLoader() suite = loader.loadTestsFromGenerator(gen, module=None) - testcase = iter(suite).next() + testcase = next(iter(suite)) self.assertEqual(testcase.test.test, test) --- ./unit_tests/test_loader.py (original) +++ ./unit_tests/test_loader.py (refactored) @@ -51,8 +51,7 @@ class TCType(type): def __new__(cls, name, bases, dct): return type.__new__(cls, name, bases, dct) - class TestMetaclassed(object): - __metaclass__ = TCType + class TestMetaclassed(object, metaclass=TCType): def test_one(self): pass def test_two(self): @@ -182,13 +181,13 @@ def mock_isdir(path): - print "is dir '%s'?" % path - paths = map(safepath, [ + print("is dir '%s'?" % path) + paths = list(map(safepath, [ '/a/dir/path', '/package', '/package/subpackage', '/sort/lib', '/sort/src', '/sort/a_test', - '/sort/test', '/sort']) - paths = paths + map(os.path.abspath, paths) + '/sort/test', '/sort'])) + paths = paths + list(map(os.path.abspath, paths)) if path in paths: return True return False @@ -201,12 +200,12 @@ def mock_exists(path): - print "exists '%s'?" % path - paths = map(safepath, [ + print("exists '%s'?" % path) + paths = list(map(safepath, [ '/package', '/package/__init__.py', '/package/subpackage', '/package/subpackage/__init__.py' - ]) - paths = paths + map(os.path.abspath, paths) + ])) + paths = paths + list(map(os.path.abspath, paths)) return path in paths @@ -270,35 +269,35 @@ l.loadTestsFromNames def test_load_from_name_dir_abs(self): - print "load from name dir" + print("load from name dir") l = self.l suite = l.loadTestsFromName(safepath('/a/dir/path')) tests = [t for t in suite] self.assertEqual(len(tests), 1) def test_load_from_name_module_filename(self): - print "load from name module filename" + print("load from name module filename") l = self.l suite = l.loadTestsFromName('test_module.py') tests = [t for t in suite] assert tests def test_load_from_name_module(self): - print "load from name module" + print("load from name module") l = self.l suite = l.loadTestsFromName('test_module') tests = [t for t in suite] assert tests def test_load_from_name_nontest_module(self): - print "load from name nontest module" + print("load from name nontest module") l = self.l suite = l.loadTestsFromName('module') tests = [t for t in suite] assert tests def test_load_from_name_method(self): - print "load from name method" + print("load from name method") res = unittest.TestResult() l = self.l suite = l.loadTestsFromName(':TC.runTest') @@ -310,11 +309,11 @@ "Expected a ValueError for unresolvable test name, got none" def test_load_from_name_module_class(self): - print "load from name module class" + print("load from name module class") l = self.l suite = l.loadTestsFromName('test_module:TC') tests = [t for t in suite] - print tests + print(tests) assert tests assert len(tests) == 1, \ "Should have loaded 1 test, but got %s" % tests @@ -322,10 +321,10 @@ # the item in tests is a suite, we want to check that all of # the members of the suite are wrapped -- though this is really # a suite test and doesn't belong here.. - assert filter(lambda t: isinstance(t, nose.case.Test), tests[0]) + assert [t for t in tests[0] if isinstance(t, nose.case.Test)] def test_load_from_name_module_func(self): - print "load from name module func" + print("load from name module func") l = self.l suite = l.loadTestsFromName('test_module:test_func') tests = [t for t in suite] @@ -336,7 +335,7 @@ "Expected FunctionTestCase not %s" % tests[0].test def test_load_from_name_module_method(self): - print "load from name module method" + print("load from name module method") l = self.l suite = l.loadTestsFromName('test_module:TC.runTest') tests = [t for t in suite] @@ -345,7 +344,7 @@ "Should have loaded 1 test, but got %s" % tests def test_load_from_name_module_missing_class(self): - print "load from name module missing class" + print("load from name module missing class") res = unittest.TestResult() l = self.l suite = l.loadTestsFromName('test_module:TC2') @@ -356,7 +355,7 @@ assert res.errors, "Expected missing class test to raise exception" def test_load_from_name_module_missing_func(self): - print "load from name module missing func" + print("load from name module missing func") res = unittest.TestResult() l = self.l suite = l.loadTestsFromName('test_module:test_func2') @@ -367,7 +366,7 @@ assert res.errors, "Expected missing func test to raise exception" def test_load_from_name_module_missing_method(self): - print "load from name module missing method" + print("load from name module missing method") res = unittest.TestResult() l = self.l suite = l.loadTestsFromName('test_module:TC.testThat') @@ -378,7 +377,7 @@ assert res.errors, "Expected missing method test to raise exception" def test_load_from_name_module_transplanted_class_missing_method(self): - print "load from name module transplanted class missing method" + print("load from name module transplanted class missing method") res = unittest.TestResult() l = self.l suite = l.loadTestsFromName('test_transplant:Transplant.testThat') @@ -389,7 +388,7 @@ assert res.errors, "Expected missing method test to raise exception" def test_load_from_name_missing_module(self): - print "load from name missing module" + print("load from name missing module") res = unittest.TestResult() l = self.l suite = l.loadTestsFromName('other_test_module') @@ -400,27 +399,27 @@ assert res.errors, "Expected missing module test to raise exception" def test_cases_from_testcase_are_wrapped(self): - print "cases from testcase are wrapped" + print("cases from testcase are wrapped") test_module = M['test_module'] l = self.l suite = l.loadTestsFromTestCase(test_module.TC) - print suite + print(suite) tests = [t for t in suite] for test in tests: assert isinstance(test, nose.case.Test), \ "Test %r is not a test wrapper" % test def test_load_test_func(self): - print "load test func" + print("load test func") l = self.l suite = l.loadTestsFromName('test_module') tests = [t for t in suite] self.assertEqual(len(tests), 2, "Wanted 2 tests, got %s" % tests) - assert filter(lambda t: isinstance(t, nose.case.Test), tests) - print tests + assert [t for t in tests if isinstance(t, nose.case.Test)] + print(tests) class_tests = tests[0] for t in class_tests: - print "class test: ", t + print("class test: ", t) func_tests = tests[1:] assert class_tests, \ "Expected class suite got %s" % class_tests @@ -434,25 +433,25 @@ "Expected FunctionTestCase not %s" % tests[1].test def test_load_from_name_package_root_path(self): - print "load from name package root path" + print("load from name package root path") l = self.l suite = l.loadTestsFromName(safepath('/package')) - print suite + print(suite) tests = [t for t in suite] assert len(tests) == 1, "Expected one test, got %s" % tests tests = list(tests[0]) assert not tests, "The full test list %s was not empty" % tests def test_load_from_name_subpackage_safepath(self): - print "load from name subpackage path" + print("load from name subpackage path") l = self.l suite = l.loadTestsFromName(safepath('/package/subpackage')) - print suite + print(suite) tests = [t for t in suite] assert len(tests) == 0, "Expected no tests, got %s" % tests def test_load_metaclass_customized_classes(self): - print "load metaclass-customized classes" + print("load metaclass-customized classes") test_module_with_generators = M['test_module_with_metaclass_tests'] l = self.l suite = l.loadTestsFromModule(test_module_with_generators) @@ -461,21 +460,21 @@ self.assertEqual(len(tc_methods), 2) def test_load_generators(self): - print "load generators" + print("load generators") test_module_with_generators = M['test_module_with_generators'] l = self.l suite = l.loadTestsFromModule(test_module_with_generators) tests = [t for t in suite] for t in tests: - print "test", t + print("test", t) assert isinstance(t, unittest.TestSuite), \ "Test %s is not a suite" % t # the first item is a class, with both normal and generator methods count = 0 cl_tests = [t for t in tests[0]] - print "class tests", cl_tests + print("class tests", cl_tests) normal, gens = cl_tests[0], cl_tests[1:] assert isinstance(normal, nose.case.Test), \ "Expected a test case but got %s" % normal @@ -484,8 +483,8 @@ "Expected a generator test suite, but got %s" % gen count = 0 for t in gen: - print "generated test %s" % t - print t.shortDescription() + print("generated test %s" % t) + print(t.shortDescription()) assert isinstance(t, nose.case.Test), \ "Test %s is not a test?" % t count += 1 @@ -495,8 +494,8 @@ # 2nd item is generated from test_func_generator count = 0 for t in tests[1]: - print "generated test %s" % t - print t.shortDescription() + print("generated test %s" % t) + print(t.shortDescription()) assert isinstance(t, nose.case.Test), \ "Test %s is not a Test?" % t RefactoringTool: Refactored ./unit_tests/test_logcapture_plugin.py RefactoringTool: No changes to ./unit_tests/test_logging.py RefactoringTool: No changes to ./unit_tests/test_multiprocess.py RefactoringTool: Refactored ./unit_tests/test_multiprocess_runner.py RefactoringTool: Refactored ./unit_tests/test_pdb_plugin.py RefactoringTool: No changes to ./unit_tests/test_plugin.py RefactoringTool: No changes to ./unit_tests/test_plugin_interfaces.py RefactoringTool: Refactored ./unit_tests/test_plugin_manager.py RefactoringTool: Refactored ./unit_tests/test_plugins.py RefactoringTool: Refactored ./unit_tests/test_result_proxy.py assert isinstance(t.test, nose.case.FunctionTestCase), \ @@ -513,8 +512,8 @@ count = 0 for t in tests[2]: - print "generated test %s" % t - print t.shortDescription() + print("generated test %s" % t) + print(t.shortDescription()) assert isinstance(t, nose.case.Test), \ "Test %s is not a Test?" % t assert isinstance(t.test, nose.case.FunctionTestCase), \ @@ -530,21 +529,21 @@ "Expected to generate 4 tests, but got %s" % count def test_load_transplanted_generator(self): - print "load transplanted generator (issue 501)" + print("load transplanted generator (issue 501)") test_module_transplant_generator = M['test_module_transplant_generator'] l = self.l suite = l.loadTestsFromModule(test_module_transplant_generator) tests = [t for t in suite] assert len(tests) == 1 - print "test", tests[0] + print("test", tests[0]) assert isinstance(tests[0], unittest.TestSuite), \ "Test is not a suite - probably did not look like a generator" count = 0 for t in tests[0]: - print "generated test %s" % t - print t.shortDescription() + print("generated test %s" % t) + print(t.shortDescription()) assert isinstance(t, nose.case.Test), \ "Test %s is not a Test?" % t assert isinstance(t.test, nose.case.FunctionTestCase), \ --- ./unit_tests/test_logcapture_plugin.py (original) +++ ./unit_tests/test_logcapture_plugin.py (refactored) @@ -181,7 +181,7 @@ parser = OptionParser() c.addOptions(parser, env) options, args = parser.parse_args(['foo']) - print options, args + print(options, args) c.configure(options, Config()) c.start() for name in ['foobar.something', 'foo', 'foo.x', 'abara', 'bar.quux']: @@ -200,7 +200,7 @@ parser = OptionParser() c.addOptions(parser, env) options, args = parser.parse_args(['foo']) - print options, args + print(options, args) c.configure(options, Config()) c.start() for name in ['foobar.something', 'foo', 'foo.x', 'abara', 'bar.quux']: @@ -218,7 +218,7 @@ parser = OptionParser() c.addOptions(parser, env) options, args = parser.parse_args(['foo']) - print options, args + print(options, args) c.configure(options, Config()) c.start() for name in ['foo.yes', 'foo.bar', 'foo.bar.no', 'blah']: @@ -230,7 +230,7 @@ assert records[0].startswith('foo.yes:'), records[0] def test_unicode_messages_handled(self): - msg = u'Ivan Krsti\u0107' + msg = 'Ivan Krsti\u0107' c = LogCapture() parser = OptionParser() c.addOptions(parser, {}) @@ -250,7 +250,7 @@ except: err = sys.exc_info() (ec, ev, tb) = c.formatError(test, err) - print ev + print(ev) if UNICODE_STRINGS: assert msg in ev else: --- ./unit_tests/test_multiprocess_runner.py (original) +++ ./unit_tests/test_multiprocess_runner.py (refactored) @@ -30,7 +30,7 @@ l = TestLoader() tests = list(r.nextBatch(ContextSuite( tests=[l.makeTest(T_fixt), l.makeTest(T)]))) - print tests + print(tests) self.assertEqual(len(tests), 3) def test_next_batch_with_module_fixt(self): @@ -50,7 +50,7 @@ r = multiprocess.MultiProcessTestRunner() l = TestLoader() tests = list(r.nextBatch(l.loadTestsFromModule(mod_with_fixt))) - print tests + print(tests) self.assertEqual(len(tests), 1) def test_next_batch_with_module(self): @@ -71,7 +71,7 @@ r = multiprocess.MultiProcessTestRunner() l = TestLoader() tests = list(r.nextBatch(l.loadTestsFromModule(mod_no_fixt))) - print tests + print(tests) self.assertEqual(len(tests), 3) def test_next_batch_with_generator_method(self): @@ -84,8 +84,8 @@ r = multiprocess.MultiProcessTestRunner() l = TestLoader() tests = list(r.nextBatch(l.makeTest(Tg))) - print tests - print [r.address(t) for t in tests] + print(tests) + print([r.address(t) for t in tests]) self.assertEqual(len(tests), 1) def test_next_batch_can_split_set(self): @@ -112,7 +112,7 @@ r = multiprocess.MultiProcessTestRunner() l = TestLoader() tests = list(r.nextBatch(l.loadTestsFromModule(mod_with_fixt2))) - print tests + print(tests) self.assertEqual(len(tests), 3) --- ./unit_tests/test_pdb_plugin.py (original) +++ ./unit_tests/test_pdb_plugin.py (refactored) @@ -3,7 +3,7 @@ from nose.config import Config from nose.plugins import debug from optparse import OptionParser -from StringIO import StringIO +from io import StringIO class StubPdb: called = False --- ./unit_tests/test_plugin_manager.py (original) +++ ./unit_tests/test_plugin_manager.py (refactored) @@ -44,7 +44,7 @@ # multiple proxy: all plugins that return values get to run all = [] for res in man.loadTestsFromFile('foo'): - print res + print(res) all.append(res) self.assertEqual(len(all), 2) --- ./unit_tests/test_plugins.py (original) +++ ./unit_tests/test_plugins.py (refactored) @@ -99,16 +99,16 @@ dtp.add_options(parser, env) options, args = parser.parse_args(argv) - print options - print args + print(options) + print(args) self.assertEqual(options.doctestExtension, ['ext', 'txt']) env = {} parser = OptionParser() dtp.add_options(parser, env) options, args = parser.parse_args(argv) - print options - print args + print(options) + print(args) self.assertEqual(options.doctestExtension, ['txt']) def test_want_file(self): @@ -171,12 +171,12 @@ plug.configure(opt, conf) suite = plug.loadTestsFromModule(foo.bar.buz) for test in suite: - print test.address() + print(test.address()) file, mod, call = test.address() self.assertEqual(mod, 'foo.bar.buz') self.assertEqual(call, None) for case in test: - print case.address() + print(case.address()) file, mod, call = case.address() self.assertEqual(mod, 'foo.bar.buz') self.assertEqual(call, 'afunc') @@ -334,7 +334,7 @@ # OR opt, args = parser.parse_args(['test', '-a', 'tags=a', '-a', 'tags=b']) - print opt + print(opt) plug.configure(opt, cnf) assert plug.wantFunction(f1) is None @@ -344,7 +344,7 @@ # AND opt, args = parser.parse_args(['test', '-a', 'tags=a,tags=b']) - print opt + print(opt) plug.configure(opt, cnf) assert plug.wantFunction(f1) is None --- ./unit_tests/test_result_proxy.py (original) +++ ./unit_tests/test_result_proxy.py (refactored) @@ -76,8 +76,8 @@ class TC(unittest.TestCase): def run(self, result): unittest.TestCase.run(self, result) - print "errors", result.errors - print "failures", result.failures + print("errors", result.errors) + print("failures", result.failures) def runTest(self): pass test = TC() @@ -103,10 +103,10 @@ res = unittest.TestResult() class TC(unittest.TestCase): def test_error(self): - print "So long" + print("So long") raise TypeError("oops") def test_fail(self): - print "Hello" RefactoringTool: Refactored ./unit_tests/test_selector.py RefactoringTool: No changes to ./unit_tests/test_selector_plugins.py RefactoringTool: Refactored ./unit_tests/test_skip_plugin.py RefactoringTool: Refactored ./unit_tests/test_suite.py RefactoringTool: Refactored ./unit_tests/test_tools.py RefactoringTool: Refactored ./unit_tests/test_twisted.py RefactoringTool: No changes to ./unit_tests/test_twisted_testcase.py RefactoringTool: Refactored ./unit_tests/test_utils.py RefactoringTool: Refactored ./unit_tests/test_xunit.py + print("Hello") self.fail() def test(self): pass --- ./unit_tests/test_selector.py (original) +++ ./unit_tests/test_selector.py (refactored) @@ -74,8 +74,8 @@ class TestType(type): def __new__(cls, name, bases, dct): return type.__new__(cls, name, bases, dct) - class TestClass(object): - __metaclass__ = TestType + class TestClass(object, metaclass=TestType): + pass s = Selector(Config()) assert not s.wantClass(Foo) --- ./unit_tests/test_skip_plugin.py (original) +++ ./unit_tests/test_skip_plugin.py (refactored) @@ -2,7 +2,7 @@ from nose.config import Config from nose.plugins.skip import Skip, SkipTest from nose.result import TextTestResult -from StringIO import StringIO +from io import StringIO from nose.result import _TextTestResult from optparse import OptionParser try: @@ -85,7 +85,7 @@ res.printErrors() out = stream.getvalue() - print out + print(out) assert out assert out.strip() == "S" assert res.wasSuccessful() @@ -107,7 +107,7 @@ res.printErrors() out = stream.getvalue() - print out + print(out) assert out assert ' ... SKIP' in out --- ./unit_tests/test_suite.py (original) +++ ./unit_tests/test_suite.py (refactored) @@ -43,13 +43,13 @@ lazytests = [] nonlazytests = [] for t in lazy: - print "lazy %s" % t + print("lazy %s" % t) lazytests.append(t) for t in nonlazy: - print "nonlazy %s" % t + print("nonlazy %s" % t) nonlazytests.append(t) - slazy = map(str, lazytests) - snonlazy = map(str, nonlazytests) + slazy = list(map(str, lazytests)) + snonlazy = list(map(str, nonlazytests)) assert slazy == snonlazy, \ "Lazy and Nonlazy produced different test lists (%s vs %s)" \ % (slazy, snonlazy) @@ -70,7 +70,7 @@ count = 0 for test in lazy: - print test + print(test) assert test count += 1 self.assertEqual(count, 2, "Expected 2 tests, got %s" % count) @@ -117,7 +117,7 @@ assert isinstance(tests[0], ContextSuite) # suite is full of wrapped tests tests = [t for t in tests[0]] - cases = filter(lambda t: isinstance(t, case.Test), tests) + cases = [t for t in tests if isinstance(t, case.Test)] assert cases assert len(cases) == len(tests) --- ./unit_tests/test_tools.py (original) +++ ./unit_tests/test_tools.py (refactored) @@ -11,7 +11,7 @@ ok_(True) try: ok_(False, "message") - except AssertionError, e: + except AssertionError as e: assert str(e) == "message" else: self.fail("ok_(False) did not raise assertion error") @@ -20,13 +20,13 @@ eq_(1, 1) try: eq_(1, 0, "message") - except AssertionError, e: + except AssertionError as e: assert str(e) == "message" else: self.fail("eq_(1, 0) did not raise assertion error") try: eq_(1, 0) - except AssertionError, e: + except AssertionError as e: assert str(e) == "1 != 0" else: self.fail("eq_(1, 0) did not raise assertion error") @@ -37,7 +37,7 @@ This lets tracebacks refrain from descending into the eq_ frame. """ - assert '__unittest' in eq_.func_globals + assert '__unittest' in eq_.__globals__ def test_istest_unittest_flag(self): """Make sure istest() is not in a namespace that has __unittest = 1. @@ -45,7 +45,7 @@ That is, make sure our __unittest labeling didn't get overzealous. """ - assert '__unittest' not in istest.func_globals + assert '__unittest' not in istest.__globals__ def test_raises(self): from nose.case import FunctionTestCase @@ -66,14 +66,14 @@ raise_good() try: raise_other() - except TypeError, e: + except TypeError as e: pass else: self.fail("raises did pass through unwanted exception") try: no_raise() - except AssertionError, e: + except AssertionError as e: pass else: self.fail("raises did not raise assertion error on no exception") @@ -163,7 +163,7 @@ import nose.tools tc_asserts = [ at for at in dir(nose.tools) if at.startswith('assert_') ] - print tc_asserts + print(tc_asserts) # FIXME: not sure which of these are in all supported # versions of python --- ./unit_tests/test_twisted.py (original) +++ ./unit_tests/test_twisted.py (refactored) @@ -29,7 +29,7 @@ #@raises(TypeError) #@deferred() def test_raises_bad_return(): - print reactor + print(reactor) reactor.resolve("www.python.org") test_raises_bad_return = raises(TypeError)(deferred()(test_raises_bad_return)) --- ./unit_tests/test_utils.py (original) +++ ./unit_tests/test_utils.py (refactored) @@ -78,8 +78,7 @@ class CustomTestType(type): pass - class CustomTC(unittest.TestCase): - __metaclass__ = CustomTestType + class CustomTC(unittest.TestCase, metaclass=CustomTestType): def test_one(self): pass def test_two(self): @@ -128,10 +127,10 @@ # issue153 -- was not detecting custom typed classes... class TCType(type): pass - class TC_custom_type(object): - __metaclass__ = TCType - class TC_unittest_custom_type(unittest.TestCase): - __metaclass__ = TCType + class TC_custom_type(object, metaclass=TCType): + pass + class TC_unittest_custom_type(unittest.TestCase, metaclass=TCType): + pass assert util.isclass(TC), "failed to detect %s as class" % TC assert util.isclass(TC_Classic), "failed to detect %s as class" % TC_Classic --- ./unit_tests/test_xunit.py (original) +++ ./unit_tests/test_xunit.py (refactored) @@ -112,7 +112,7 @@ self.x.addFailure(test, some_err) result = self.get_xml_report() - print result + print(result) if self.ET: tree = self.ET.fromstring(result) @@ -155,7 +155,7 @@ self.x.addFailure(test, some_err) result = self.get_xml_report() - print result + print(result) if self.ET: tree = self.ET.fromstring(result) @@ -179,7 +179,7 @@ self.x.addError(test, some_err) result = self.get_xml_report() - print result + print(result) if self.ET: tree = self.ET.fromstring(result) @@ -220,7 +220,7 @@ some_err = sys.exc_info() self.x.addError(test, some_err) result = self.get_xml_report() - print repr(result) + print(repr(result)) if self.ET: tree = self.ET.fromstring(result) tc = tree.find("testcase") @@ -230,7 +230,7 @@ '\x80') else: eq_(err.attrib['message'], - u'\ufffd') + '\ufffd') else: # this is a dumb test for 2.4- assert 'RuntimeError: \xef\xbf\xbd' in result @@ -249,7 +249,7 @@ self.x.addError(test, some_err) result = self.get_xml_report() - print result + print(result) if self.ET: tree = self.ET.fromstring(result) @@ -268,7 +268,7 @@ self.x.addSuccess(test, (None,None,None)) result = self.get_xml_report() - print result + print(result) if self.ET: tree = self.ET.fromstring(result) @@ -297,7 +297,7 @@ self.x.addSuccess(test, (None,None,None)) RefactoringTool: Refactored ./unit_tests/support/script.py RefactoringTool: No changes to ./unit_tests/support/test.py RefactoringTool: No changes to ./unit_tests/support/bug105/tests.py RefactoringTool: No changes to ./unit_tests/support/doctest/err_doctests.py RefactoringTool: No changes to ./unit_tests/support/doctest/no_doctests.py RefactoringTool: No changes to ./unit_tests/support/doctest/noname_wrapper.py RefactoringTool: No changes to ./unit_tests/support/foo/__init__.py RefactoringTool: No changes to ./unit_tests/support/foo/bar/buz.py RefactoringTool: No changes to ./unit_tests/support/issue006/tests.py RefactoringTool: Refactored ./unit_tests/support/issue135/tests.py RefactoringTool: Files that were modified: RefactoringTool: ./distribute_setup.py RefactoringTool: ./patch.py RefactoringTool: ./selftest.py RefactoringTool: ./setup.py RefactoringTool: ./setup3lib.py RefactoringTool: ./doc/conf.py RefactoringTool: ./doc/docstring.py RefactoringTool: ./examples/attrib_plugin.py RefactoringTool: ./examples/html_plugin/htmlplug.py RefactoringTool: ./examples/html_plugin/setup.py RefactoringTool: ./examples/plugin/setup.py RefactoringTool: ./functional_tests/test_attribute_plugin.py RefactoringTool: ./functional_tests/test_buggy_generators.py RefactoringTool: ./functional_tests/test_cases.py RefactoringTool: ./functional_tests/test_collector.py RefactoringTool: ./functional_tests/test_commands.py RefactoringTool: ./functional_tests/test_config_files.py RefactoringTool: ./functional_tests/test_coverage_plugin.py RefactoringTool: ./functional_tests/test_defaultpluginmanager.py RefactoringTool: ./functional_tests/test_doctest_plugin.py RefactoringTool: ./functional_tests/test_entrypoints.py RefactoringTool: ./functional_tests/test_failure.py RefactoringTool: ./functional_tests/test_failuredetail_plugin.py RefactoringTool: ./functional_tests/test_generator_fixtures.py RefactoringTool: ./functional_tests/test_id_plugin.py RefactoringTool: ./functional_tests/test_importer.py RefactoringTool: ./functional_tests/test_isolate_plugin.py RefactoringTool: ./functional_tests/test_issue_072.py RefactoringTool: ./functional_tests/test_issue_082.py RefactoringTool: ./functional_tests/test_issue_408.py RefactoringTool: ./functional_tests/test_issue_649.py RefactoringTool: ./functional_tests/test_load_tests_from_test_case.py RefactoringTool: ./functional_tests/test_loader.py RefactoringTool: ./functional_tests/test_namespace_pkg.py RefactoringTool: ./functional_tests/test_plugin_api.py RefactoringTool: ./functional_tests/test_plugins.py RefactoringTool: ./functional_tests/test_plugintest.py RefactoringTool: ./functional_tests/test_program.py RefactoringTool: ./functional_tests/test_result.py RefactoringTool: ./functional_tests/test_selector.py RefactoringTool: ./functional_tests/test_skip_pdb_interaction.py RefactoringTool: ./functional_tests/test_string_exception.py RefactoringTool: ./functional_tests/test_success.py RefactoringTool: ./functional_tests/test_suite.py RefactoringTool: ./functional_tests/test_xunit.py RefactoringTool: ./functional_tests/doc_tests/test_allmodules/support/mod.py RefactoringTool: ./functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures_fixtures.py RefactoringTool: ./functional_tests/doc_tests/test_issue119/test_zeronine.py RefactoringTool: ./functional_tests/doc_tests/test_issue142/support/errorclass_failing_test.py RefactoringTool: ./functional_tests/doc_tests/test_issue142/support/errorclass_failure_plugin.py RefactoringTool: ./functional_tests/doc_tests/test_issue142/support/errorclass_tests.py RefactoringTool: ./functional_tests/doc_tests/test_issue145/support/package1/__init__.py RefactoringTool: ./functional_tests/doc_tests/test_issue145/support/package2c/__init__.py RefactoringTool: ./functional_tests/doc_tests/test_issue145/support/package2f/__init__.py RefactoringTool: ./functional_tests/doc_tests/test_multiprocess/multiprocess_fixtures.py RefactoringTool: ./functional_tests/doc_tests/test_multiprocess/support/test_can_split.py RefactoringTool: ./functional_tests/doc_tests/test_multiprocess/support/test_not_shared.py RefactoringTool: ./functional_tests/doc_tests/test_multiprocess/support/test_shared.py RefactoringTool: ./functional_tests/doc_tests/test_selector_plugin/support/mypackage/strings.py RefactoringTool: ./functional_tests/doc_tests/test_selector_plugin/support/tests/testlib.py RefactoringTool: ./functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py RefactoringTool: ./functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py RefactoringTool: ./functional_tests/doc_tests/test_xunit_plugin/support/test_skip.py RefactoringTool: ./functional_tests/support/test_buggy_generators.py RefactoringTool: ./functional_tests/support/att/test_attr.py RefactoringTool: ./functional_tests/support/coverage/blah.py RefactoringTool: ./functional_tests/support/coverage2/blah.py RefactoringTool: ./functional_tests/support/coverage2/moo.py RefactoringTool: ./functional_tests/support/ctx/mod_import_skip.py RefactoringTool: ./functional_tests/support/ctx/mod_setup_fails.py RefactoringTool: ./functional_tests/support/ctx/mod_setup_skip.py RefactoringTool: ./functional_tests/support/dtt/some_mod.py RefactoringTool: ./functional_tests/support/ep/setup.py RefactoringTool: ./functional_tests/support/fdp/test_fdp.py RefactoringTool: ./functional_tests/support/fdp/test_fdp_no_capt.py RefactoringTool: ./functional_tests/support/gen/test.py RefactoringTool: ./functional_tests/support/idp/exm.py RefactoringTool: ./functional_tests/support/idp/tests.py RefactoringTool: ./functional_tests/support/ipt/test1/ipthelp.py RefactoringTool: ./functional_tests/support/ipt/test1/tests.py RefactoringTool: ./functional_tests/support/ipt/test2/ipthelp.py RefactoringTool: ./functional_tests/support/ipt/test2/tests.py RefactoringTool: ./functional_tests/support/issue038/test.py RefactoringTool: ./functional_tests/support/issue072/test.py RefactoringTool: ./functional_tests/support/issue082/_mypackage/_eggs.py RefactoringTool: ./functional_tests/support/issue082/_mypackage/bacon.py RefactoringTool: ./functional_tests/support/issue082/mypublicpackage/_foo.py RefactoringTool: ./functional_tests/support/issue082/mypublicpackage/bar.py RefactoringTool: ./functional_tests/support/issue130/test.py RefactoringTool: ./functional_tests/support/issue134/test.py RefactoringTool: ./functional_tests/support/issue143/not-a-package/test.py RefactoringTool: ./functional_tests/support/issue191/setup.py RefactoringTool: ./functional_tests/support/issue269/test_bad_class.py RefactoringTool: ./functional_tests/support/issue279/test_mod_setup_fails.py RefactoringTool: ./functional_tests/support/issue408/test.py RefactoringTool: ./functional_tests/support/issue513/test.py RefactoringTool: ./functional_tests/support/issue649/test.py RefactoringTool: ./functional_tests/support/issue680/test.py RefactoringTool: ./functional_tests/support/issue700/test.py RefactoringTool: ./functional_tests/support/issue720/test.py RefactoringTool: ./functional_tests/support/issue771/test.py RefactoringTool: ./functional_tests/support/ltfn/test_mod.py RefactoringTool: ./functional_tests/support/ltfn/test_pak1/__init__.py RefactoringTool: ./functional_tests/support/ltfn/test_pak1/test_mod.py RefactoringTool: ./functional_tests/support/ltfn/test_pak2/__init__.py RefactoringTool: ./functional_tests/support/namespace_pkg/namespace_pkg/example.py RefactoringTool: ./functional_tests/support/namespace_pkg/namespace_pkg/test_pkg.py RefactoringTool: ./functional_tests/support/namespace_pkg/site-packages/namespace_pkg/example2.py RefactoringTool: ./functional_tests/support/namespace_pkg/site-packages/namespace_pkg/test_pkg2.py RefactoringTool: ./functional_tests/support/package1/example.py RefactoringTool: ./functional_tests/support/package2/test_pak/__init__.py RefactoringTool: ./functional_tests/support/package2/test_pak/test_mod.py RefactoringTool: ./functional_tests/support/package2/test_pak/test_sub/__init__.py RefactoringTool: ./functional_tests/support/package2/test_pak/test_sub/test_mod.py RefactoringTool: ./functional_tests/support/string-exception/test.py RefactoringTool: ./functional_tests/support/todo/test_with_todo.py RefactoringTool: ./functional_tests/support/todo/todoplug.py RefactoringTool: ./functional_tests/support/twist/test_twisted.py RefactoringTool: ./functional_tests/support/xunit/test_xunit_as_suite.py RefactoringTool: ./functional_tests/test_multiprocessing/__init__.py RefactoringTool: ./functional_tests/test_multiprocessing/test_class.py RefactoringTool: ./functional_tests/test_multiprocessing/test_keyboardinterrupt.py RefactoringTool: ./functional_tests/test_multiprocessing/test_nameerror.py RefactoringTool: ./functional_tests/test_multiprocessing/test_process_timeout.py RefactoringTool: ./functional_tests/test_multiprocessing/support/class.py RefactoringTool: ./functional_tests/test_multiprocessing/support/fake_nosetest.py RefactoringTool: ./functional_tests/test_multiprocessing/support/keyboardinterrupt.py RefactoringTool: ./functional_tests/test_multiprocessing/support/keyboardinterrupt_twice.py RefactoringTool: ./functional_tests/test_multiprocessing/support/timeout.py RefactoringTool: ./functional_tests/test_multiprocessing/support/concurrent_shared/__init__.py RefactoringTool: ./nose/__init__.py RefactoringTool: ./nose/__main__.py RefactoringTool: ./nose/case.py RefactoringTool: ./nose/commands.py RefactoringTool: ./nose/config.py RefactoringTool: ./nose/core.py RefactoringTool: ./nose/exc.py RefactoringTool: ./nose/failure.py RefactoringTool: ./nose/importer.py RefactoringTool: ./nose/inspector.py RefactoringTool: ./nose/loader.py RefactoringTool: ./nose/proxy.py RefactoringTool: ./nose/pyversion.py RefactoringTool: ./nose/result.py RefactoringTool: ./nose/selector.py RefactoringTool: ./nose/suite.py RefactoringTool: ./nose/twistedtools.py RefactoringTool: ./nose/util.py RefactoringTool: ./nose/ext/__init__.py RefactoringTool: ./nose/ext/dtcompat.py RefactoringTool: ./nose/plugins/__init__.py RefactoringTool: ./nose/plugins/allmodules.py RefactoringTool: ./nose/plugins/attrib.py RefactoringTool: ./nose/plugins/base.py RefactoringTool: ./nose/plugins/builtin.py RefactoringTool: ./nose/plugins/capture.py RefactoringTool: ./nose/plugins/collect.py RefactoringTool: ./nose/plugins/cover.py RefactoringTool: ./nose/plugins/debug.py RefactoringTool: ./nose/plugins/deprecated.py RefactoringTool: ./nose/plugins/doctests.py RefactoringTool: ./nose/plugins/errorclass.py RefactoringTool: ./nose/plugins/failuredetail.py RefactoringTool: ./nose/plugins/isolate.py RefactoringTool: ./nose/plugins/logcapture.py RefactoringTool: ./nose/plugins/manager.py RefactoringTool: ./nose/plugins/multiprocess.py RefactoringTool: ./nose/plugins/plugintest.py RefactoringTool: ./nose/plugins/prof.py RefactoringTool: ./nose/plugins/skip.py RefactoringTool: ./nose/plugins/testid.py RefactoringTool: ./nose/plugins/xunit.py RefactoringTool: ./nose/sphinx/pluginopts.py RefactoringTool: ./nose/tools/__init__.py RefactoringTool: ./nose/tools/nontrivial.py RefactoringTool: ./nose/tools/trivial.py RefactoringTool: ./unit_tests/helpers.py RefactoringTool: ./unit_tests/mock.py RefactoringTool: ./unit_tests/test_attribute_plugin.py RefactoringTool: ./unit_tests/test_bug105.py RefactoringTool: ./unit_tests/test_capture_plugin.py RefactoringTool: ./unit_tests/test_cases.py RefactoringTool: ./unit_tests/test_config.py RefactoringTool: ./unit_tests/test_core.py RefactoringTool: ./unit_tests/test_cover_plugin.py RefactoringTool: ./unit_tests/test_deprecated_plugin.py RefactoringTool: ./unit_tests/test_doctest_error_handling.py RefactoringTool: ./unit_tests/test_doctest_no_name.py RefactoringTool: ./unit_tests/test_id_plugin.py RefactoringTool: ./unit_tests/test_importer.py RefactoringTool: ./unit_tests/test_inspector.py RefactoringTool: ./unit_tests/test_issue135.py RefactoringTool: ./unit_tests/test_issue270_fixtures.py RefactoringTool: ./unit_tests/test_issue_006.py RefactoringTool: ./unit_tests/test_issue_065.py RefactoringTool: ./unit_tests/test_issue_101.py RefactoringTool: ./unit_tests/test_issue_227.py RefactoringTool: ./unit_tests/test_issue_230.py RefactoringTool: ./unit_tests/test_lazy_suite.py RefactoringTool: ./unit_tests/test_loader.py RefactoringTool: ./unit_tests/test_logcapture_plugin.py RefactoringTool: ./unit_tests/test_logging.py RefactoringTool: ./unit_tests/test_multiprocess.py RefactoringTool: ./unit_tests/test_multiprocess_runner.py RefactoringTool: ./unit_tests/test_pdb_plugin.py RefactoringTool: ./unit_tests/test_plugin.py RefactoringTool: ./unit_tests/test_plugin_interfaces.py RefactoringTool: ./unit_tests/test_plugin_manager.py RefactoringTool: ./unit_tests/test_plugins.py RefactoringTool: ./unit_tests/test_result_proxy.py RefactoringTool: ./unit_tests/test_selector.py RefactoringTool: ./unit_tests/test_selector_plugins.py RefactoringTool: ./unit_tests/test_skip_plugin.py RefactoringTool: ./unit_tests/test_suite.py RefactoringTool: ./unit_tests/test_tools.py RefactoringTool: ./unit_tests/test_twisted.py RefactoringTool: ./unit_tests/test_twisted_testcase.py RefactoringTool: ./unit_tests/test_utils.py RefactoringTool: ./unit_tests/test_xunit.py RefactoringTool: ./unit_tests/support/script.py RefactoringTool: ./unit_tests/support/test.py RefactoringTool: ./unit_tests/support/bug105/tests.py RefactoringTool: ./unit_tests/support/doctest/err_doctests.py RefactoringTool: ./unit_tests/support/doctest/no_doctests.py RefactoringTool: ./unit_tests/support/doctest/noname_wrapper.py RefactoringTool: ./unit_tests/support/foo/__init__.py RefactoringTool: ./unit_tests/support/foo/bar/buz.py RefactoringTool: ./unit_tests/support/issue006/tests.py RefactoringTool: ./unit_tests/support/issue135/tests.py RefactoringTool: Warnings/messages while refactoring: RefactoringTool: ### In file ./patch.py ### RefactoringTool: Line 50: Calls to builtin next() possibly shadowed by global binding RefactoringTool: ### In file ./functional_tests/support/issue130/test.py ### RefactoringTool: Line 2: could not convert: raise "KABOOM" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./functional_tests/support/string-exception/test.py ### RefactoringTool: Line 14: could not convert: raise "string exception in setup" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 22: could not convert: raise "string exception in teardown" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 30: could not convert: raise "string exception in test" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 9: could not convert: raise "string exception" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./unit_tests/test_issue_101.py ### RefactoringTool: Line 22: could not convert: raise "oh no!" RefactoringTool: Python 3 does not support string exceptions result = self.get_xml_report() - print result + print(result) if self.ET: tree = self.ET.fromstring(result) --- ./unit_tests/support/script.py (original) +++ ./unit_tests/support/script.py (refactored) @@ -1,3 +1,3 @@ #!/usr/bin/env python -print "FAIL" +print("FAIL") --- ./unit_tests/support/issue135/tests.py (original) +++ ./unit_tests/support/issue135/tests.py (refactored) @@ -2,5 +2,5 @@ class TestIssue135(unittest.TestCase): def test_issue135(self): - print "something" + print("something") raise KeyError("fake") phase `invoke-2to3' succeeded after 13.8 seconds starting phase `ensure-no-mtimes-pre-1980' phase `ensure-no-mtimes-pre-1980' succeeded after 0.0 seconds starting phase `enable-bytecode-determinism' phase `enable-bytecode-determinism' succeeded after 0.0 seconds starting phase `ensure-no-cythonized-files' phase `ensure-no-cythonized-files' succeeded after 0.0 seconds starting phase `patch-usr-bin-file' phase `patch-usr-bin-file' succeeded after 0.0 seconds starting phase `patch-source-shebangs' patch-shebang: ./bin/nosetests: changing `/usr/bin/env python' to `/gnu/store/j3cx0yaqdpw0mxizp5bayx93pya44dhn-python-wrapper-3.9.9/bin/python' patch-shebang: ./selftest.py: changing `/usr/bin/env python' to `/gnu/store/j3cx0yaqdpw0mxizp5bayx93pya44dhn-python-wrapper-3.9.9/bin/python' patch-shebang: ./unit_tests/support/script.py: changing `/usr/bin/env python' to `/gnu/store/j3cx0yaqdpw0mxizp5bayx93pya44dhn-python-wrapper-3.9.9/bin/python' patch-shebang: ./unit_tests/support/script.py.bak: changing `/usr/bin/env python' to `/gnu/store/j3cx0yaqdpw0mxizp5bayx93pya44dhn-python-wrapper-3.9.9/bin/python' phase `patch-source-shebangs' succeeded after 0.1 seconds starting phase `patch-generated-file-shebangs' phase `patch-generated-file-shebangs' succeeded after 0.0 seconds starting phase `build' running "python setup.py" with command "build" and parameters () running build running build_py creating build creating build/lib creating build/lib/nose copying nose/__init__.py -> build/lib/nose copying nose/__main__.py -> build/lib/nose copying nose/exc.py -> build/lib/nose copying nose/importer.py -> build/lib/nose copying nose/proxy.py -> build/lib/nose copying nose/case.py -> build/lib/nose copying nose/commands.py -> build/lib/nose copying nose/config.py -> build/lib/nose copying nose/core.py -> build/lib/nose copying nose/failure.py -> build/lib/nose copying nose/inspector.py -> build/lib/nose copying nose/loader.py -> build/lib/nose copying nose/pyversion.py -> build/lib/nose copying nose/result.py -> build/lib/nose copying nose/selector.py -> build/lib/nose copying nose/suite.py -> build/lib/nose copying nose/twistedtools.py -> build/lib/nose copying nose/util.py -> build/lib/nose creating build/lib/nose/ext copying nose/ext/__init__.py -> build/lib/nose/ext copying nose/ext/dtcompat.py -> build/lib/nose/ext creating build/lib/nose/plugins copying nose/plugins/__init__.py -> build/lib/nose/plugins copying nose/plugins/allmodules.py -> build/lib/nose/plugins copying nose/plugins/builtin.py -> build/lib/nose/plugins copying nose/plugins/collect.py -> build/lib/nose/plugins copying nose/plugins/debug.py -> build/lib/nose/plugins copying nose/plugins/deprecated.py -> build/lib/nose/plugins copying nose/plugins/failuredetail.py -> build/lib/nose/plugins copying nose/plugins/prof.py -> build/lib/nose/plugins copying nose/plugins/skip.py -> build/lib/nose/plugins copying nose/plugins/attrib.py -> build/lib/nose/plugins copying nose/plugins/base.py -> build/lib/nose/plugins copying nose/plugins/capture.py -> build/lib/nose/plugins copying nose/plugins/cover.py -> build/lib/nose/plugins copying nose/plugins/doctests.py -> build/lib/nose/plugins copying nose/plugins/errorclass.py -> build/lib/nose/plugins copying nose/plugins/isolate.py -> build/lib/nose/plugins copying nose/plugins/logcapture.py -> build/lib/nose/plugins copying nose/plugins/manager.py -> build/lib/nose/plugins copying nose/plugins/multiprocess.py -> build/lib/nose/plugins copying nose/plugins/plugintest.py -> build/lib/nose/plugins copying nose/plugins/testid.py -> build/lib/nose/plugins copying nose/plugins/xunit.py -> build/lib/nose/plugins creating build/lib/nose/sphinx copying nose/sphinx/__init__.py -> build/lib/nose/sphinx copying nose/sphinx/pluginopts.py -> build/lib/nose/sphinx creating build/lib/nose/tools copying nose/tools/__init__.py -> build/lib/nose/tools copying nose/tools/trivial.py -> build/lib/nose/tools copying nose/tools/nontrivial.py -> build/lib/nose/tools copying nose/usage.txt -> build/lib/nose warning: build_py: byte-compiling is disabled, skipping. running build_scripts creating build/scripts-3.9 copying and adjusting bin/nosetests -> build/scripts-3.9 changing mode of build/scripts-3.9/nosetests from 644 to 755 phase `build' succeeded after 0.5 seconds starting phase `install' running "python setup.py" with command "install" and parameters ("--prefix=/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7" "--no-compile" "--single-version-externally-managed" "--root=/") running install running build running build_py warning: build_py: byte-compiling is disabled, skipping. running build_scripts running install_lib creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7 creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9 creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/__init__.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/__main__.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/exc.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/importer.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/proxy.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/case.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/commands.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/config.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/core.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/failure.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/inspector.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/loader.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/pyversion.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/result.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/selector.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/suite.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/twistedtools.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose copying build/lib/nose/util.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/ext copying build/lib/nose/ext/__init__.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/ext copying build/lib/nose/ext/dtcompat.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/ext creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/__init__.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/allmodules.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/builtin.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/collect.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/debug.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/deprecated.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/failuredetail.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/prof.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/skip.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/attrib.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/base.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/capture.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/cover.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/doctests.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/errorclass.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/isolate.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/logcapture.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/manager.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/multiprocess.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/plugintest.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/testid.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins copying build/lib/nose/plugins/xunit.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/sphinx copying build/lib/nose/sphinx/__init__.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/sphinx copying build/lib/nose/sphinx/pluginopts.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/sphinx creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools copying build/lib/nose/tools/__init__.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools copying build/lib/nose/tools/trivial.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools copying build/lib/nose/tools/nontrivial.py -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools copying build/lib/nose/usage.txt -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose warning: install_lib: byte-compiling is disabled, skipping. running install_data creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/man creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/man/man1 copying nosetests.1 -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/man/man1 running install_egg_info running egg_info writing nose.egg-info/PKG-INFO writing dependency_links to nose.egg-info/dependency_links.txt deleting nose.egg-info/entry_points.txt writing top-level names to nose.egg-info/top_level.txt reading manifest file 'nose.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'doc/.build' adding license file 'AUTHORS' writing manifest file 'nose.egg-info/SOURCES.txt' Copying nose.egg-info to /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose-1.3.7-py3.9.egg-info running install_scripts creating /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/bin copying build/scripts-3.9/nosetests -> /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/bin changing mode of /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/bin/nosetests to 755 Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/bin'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/__init__.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/__main__.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/case.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/commands.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/config.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/core.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/exc.py'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/ext'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/ext/__init__.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/ext/dtcompat.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/failure.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/importer.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/inspector.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/loader.py'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/__init__.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/allmodules.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/attrib.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/base.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/builtin.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/capture.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/collect.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/cover.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/debug.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/deprecated.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/doctests.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/errorclass.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/failuredetail.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/isolate.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/logcapture.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/manager.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/multiprocess.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/plugintest.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/prof.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/skip.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/testid.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/plugins/xunit.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/proxy.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/pyversion.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/result.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/selector.py'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/sphinx'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/sphinx/__init__.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/sphinx/pluginopts.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/suite.py'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools/__init__.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools/nontrivial.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/tools/trivial.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/twistedtools.py'... Compiling '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose/util.py'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages/nose-1.3.7-py3.9.egg-info'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/man'... Listing '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/man/man1'... phase `install' succeeded after 0.6 seconds starting phase `add-install-to-pythonpath' phase `add-install-to-pythonpath' succeeded after 0.0 seconds starting phase `add-install-to-path' phase `add-install-to-path' succeeded after 0.0 seconds starting phase `wrap' find-files: /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/sbin: No such file or directory phase `wrap' succeeded after 0.0 seconds starting phase `check' test suite not run phase `check' succeeded after 0.0 seconds starting phase `sanity-check' validating 'nose' /gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib/python3.9/site-packages ...checking requirements: OK ...trying to load module nose: OK phase `sanity-check' succeeded after 0.2 seconds starting phase `patch-shebangs' phase `patch-shebangs' succeeded after 0.0 seconds starting phase `rename-pth-file' phase `rename-pth-file' succeeded after 0.0 seconds starting phase `strip' stripping binaries in "/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib" with "strip" and flags ("--strip-unneeded" "--enable-deterministic-archives") stripping binaries in "/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/bin" with "strip" and flags ("--strip-unneeded" "--enable-deterministic-archives") phase `strip' succeeded after 0.0 seconds starting phase `validate-runpath' validating RUNPATH of 0 binaries in "/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/lib"... validating RUNPATH of 0 binaries in "/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/bin"... phase `validate-runpath' succeeded after 0.0 seconds starting phase `validate-documentation-location' moving '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/man' to '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/share/man' phase `validate-documentation-location' succeeded after 0.0 seconds starting phase `delete-info-dir-file' phase `delete-info-dir-file' succeeded after 0.0 seconds starting phase `patch-dot-desktop-files' phase `patch-dot-desktop-files' succeeded after 0.0 seconds starting phase `make-dynamic-linker-cache' phase `make-dynamic-linker-cache' succeeded after 0.0 seconds starting phase `install-license-files' installing 0 license files from '.' phase `install-license-files' succeeded after 0.0 seconds starting phase `reset-gzip-timestamps' phase `reset-gzip-timestamps' succeeded after 0.0 seconds starting phase `compress-documentation' compressing documentation in '/gnu/store/2fw1jyf1522z2c8y9m7pz7fh0y0y1aih-python-nose-1.3.7/share/man' with "gzip" and flags ("--best" "--no-name") phase `compress-documentation' succeeded after 0.0 seconds