From 9da1ba40edaef620a98f8bd93b0ad77ae263631c Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 13 Jan 2010 17:15:54 +0100 Subject: [PATCH] move down py/impl/XYZ to py/_XYZ --HG-- branch : trunk --- bin-for-dist/makepluginlist.py | 2 +- doc/confrest.py | 2 +- doc/test/plugin/xdist.txt | 1 + py/__init__.py | 220 +++++++++--------- py/{impl/_metainfo.py => __metainfo.py} | 0 py/{impl/builtin.py => _builtin.py} | 0 py/{impl/cmdline => _cmdline}/__init__.py | 0 py/{impl/cmdline => _cmdline}/pycleanup.py | 0 .../pyconvert_unittest.py | 0 py/{impl/cmdline => _cmdline}/pycountloc.py | 0 py/{impl/cmdline => _cmdline}/pylookup.py | 2 +- .../cmdline => _cmdline}/pysvnwcrevert.py | 0 py/{impl/cmdline => _cmdline}/pytest.py | 0 py/{impl/cmdline => _cmdline}/pywhich.py | 0 py/{impl/code => _code}/__init__.py | 0 py/{impl/code => _code}/_assertionnew.py | 2 +- py/{impl/code => _code}/_assertionold.py | 2 +- py/{impl/code => _code}/assertion.py | 4 +- py/{impl/code => _code}/code.py | 6 +- py/{impl/code => _code}/oldmagic.py | 0 py/{impl/code => _code}/oldmagic2.py | 0 py/{impl/code => _code}/source.py | 0 py/{impl/compat => _compat}/__init__.py | 0 py/{impl/compat => _compat}/dep_doctest.py | 0 py/{impl/compat => _compat}/dep_optparse.py | 0 py/{impl/compat => _compat}/dep_subprocess.py | 0 py/{impl/compat => _compat}/dep_textwrap.py | 0 py/{impl/error.py => _error.py} | 0 py/{impl/io => _io}/__init__.py | 0 py/{impl/io => _io}/capture.py | 0 py/{impl/io => _io}/terminalwriter.py | 0 py/{impl/log => _log}/__init__.py | 0 py/{impl/log => _log}/log.py | 0 py/{impl/log => _log}/warning.py | 0 py/{impl/path => _path}/__init__.py | 0 py/{impl/path => _path}/cacheutil.py | 0 py/{impl/path => _path}/common.py | 0 py/{impl/path => _path}/gateway/__init__.py | 0 .../path => _path}/gateway/channeltest.py | 0 .../path => _path}/gateway/channeltest2.py | 0 py/{impl/path => _path}/gateway/remotepath.py | 2 +- py/{impl/path => _path}/local.py | 2 +- py/{impl/path => _path}/svnurl.py | 6 +- py/{impl/path => _path}/svnwc.py | 2 +- py/{plugin => _plugin}/__init__.py | 0 py/{plugin => _plugin}/hookspec.py | 0 py/{plugin => _plugin}/pytest__pytest.py | 2 +- py/{plugin => _plugin}/pytest_assertion.py | 0 py/{plugin => _plugin}/pytest_capture.py | 0 py/{plugin => _plugin}/pytest_default.py | 2 +- py/{plugin => _plugin}/pytest_doctest.py | 2 +- py/{plugin => _plugin}/pytest_genscript.py | 0 py/{plugin => _plugin}/pytest_helpconfig.py | 0 py/{plugin => _plugin}/pytest_hooklog.py | 0 py/{plugin => _plugin}/pytest_logxml.py | 0 py/{plugin => _plugin}/pytest_mark.py | 0 py/{plugin => _plugin}/pytest_monkeypatch.py | 0 py/{plugin => _plugin}/pytest_nose.py | 0 py/{plugin => _plugin}/pytest_pastebin.py | 0 py/{plugin => _plugin}/pytest_pdb.py | 2 +- py/{plugin => _plugin}/pytest_pylint.py | 0 py/{plugin => _plugin}/pytest_pytester.py | 5 +- py/{plugin => _plugin}/pytest_recwarn.py | 0 py/{plugin => _plugin}/pytest_restdoc.py | 0 py/{plugin => _plugin}/pytest_resultlog.py | 0 py/{plugin => _plugin}/pytest_runner.py | 2 +- py/{plugin => _plugin}/pytest_skipping.py | 0 py/{plugin => _plugin}/pytest_terminal.py | 0 py/{plugin => _plugin}/pytest_tmpdir.py | 0 py/{plugin => _plugin}/pytest_unittest.py | 0 py/{plugin => _plugin}/standalonetemplate.py | 0 py/{impl/process => _process}/__init__.py | 0 py/{impl/process => _process}/cmdexec.py | 0 py/{impl/process => _process}/forkedfunc.py | 0 py/{impl/process => _process}/killproc.py | 0 py/{impl/std.py => _std.py} | 0 py/{impl/test => _test}/__init__.py | 0 py/{impl/test => _test}/cmdline.py | 0 py/{impl/test => _test}/collect.py | 0 py/{impl/test => _test}/compat.py | 0 py/{impl/test => _test}/config.py | 10 +- py/{impl/test => _test}/conftesthandle.py | 0 py/{impl/test => _test}/funcargs.py | 0 py/{impl/test => _test}/outcome.py | 0 py/{impl/test => _test}/parseopt.py | 0 py/{impl/test => _test}/pluginmanager.py | 6 +- py/{impl/test => _test}/pycollect.py | 4 +- py/{impl/test => _test}/session.py | 2 +- py/{impl/xmlgen.py => _xmlgen.py} | 0 py/impl/__init__.py | 0 setup.py | 19 +- testing/cmdline/test_convert_unittest.py | 2 +- testing/code/test_assertion.py | 2 +- testing/code/test_code.py | 4 +- testing/code/test_excinfo.py | 2 +- testing/code/test_source.py | 10 +- testing/io_/test_capture.py | 2 +- testing/io_/test_terminalwriter.py | 2 +- testing/log/test_log.py | 2 +- testing/path/conftest.py | 2 +- testing/path/svntestbase.py | 2 +- testing/path/test_cacheutil.py | 2 +- testing/path/test_svnurl.py | 2 +- testing/path/test_svnwc.py | 4 +- testing/plugin/conftest.py | 6 +- testing/plugin/test_pytest__pytest.py | 6 +- testing/plugin/test_pytest_capture.py | 2 +- testing/plugin/test_pytest_default.py | 2 +- testing/plugin/test_pytest_doctest.py | 4 +- testing/plugin/test_pytest_helpconfig.py | 2 +- testing/plugin/test_pytest_mark.py | 2 +- testing/plugin/test_pytest_monkeypatch.py | 2 +- testing/plugin/test_pytest_pytester.py | 2 +- testing/plugin/test_pytest_recwarn.py | 2 +- testing/plugin/test_pytest_restdoc.py | 4 +- testing/plugin/test_pytest_resultlog.py | 4 +- testing/plugin/test_pytest_runner.py | 10 +- testing/plugin/test_pytest_skipping.py | 6 +- testing/plugin/test_pytest_terminal.py | 4 +- testing/plugin/test_pytest_tmpdir.py | 4 +- testing/root/test_py_imports.py | 15 +- testing/root/test_xmlgen.py | 2 +- testing/test_collect.py | 2 +- testing/test_compat.py | 4 +- testing/test_config.py | 8 +- testing/test_conftesthandle.py | 2 +- testing/test_deprecated_api.py | 2 +- testing/test_funcargs.py | 2 +- testing/test_outcome.py | 2 +- testing/test_parseopt.py | 2 +- testing/test_pluginmanager.py | 8 +- testing/test_pycollect.py | 2 +- 132 files changed, 229 insertions(+), 231 deletions(-) rename py/{impl/_metainfo.py => __metainfo.py} (100%) rename py/{impl/builtin.py => _builtin.py} (100%) rename py/{impl/cmdline => _cmdline}/__init__.py (100%) rename py/{impl/cmdline => _cmdline}/pycleanup.py (100%) rename py/{impl/cmdline => _cmdline}/pyconvert_unittest.py (100%) rename py/{impl/cmdline => _cmdline}/pycountloc.py (100%) rename py/{impl/cmdline => _cmdline}/pylookup.py (97%) rename py/{impl/cmdline => _cmdline}/pysvnwcrevert.py (100%) rename py/{impl/cmdline => _cmdline}/pytest.py (100%) rename py/{impl/cmdline => _cmdline}/pywhich.py (100%) rename py/{impl/code => _code}/__init__.py (100%) rename py/{impl/code => _code}/_assertionnew.py (99%) rename py/{impl/code => _code}/_assertionold.py (99%) rename py/{impl/code => _code}/assertion.py (95%) rename py/{impl/code => _code}/code.py (99%) rename py/{impl/code => _code}/oldmagic.py (100%) rename py/{impl/code => _code}/oldmagic2.py (100%) rename py/{impl/code => _code}/source.py (100%) rename py/{impl/compat => _compat}/__init__.py (100%) rename py/{impl/compat => _compat}/dep_doctest.py (100%) rename py/{impl/compat => _compat}/dep_optparse.py (100%) rename py/{impl/compat => _compat}/dep_subprocess.py (100%) rename py/{impl/compat => _compat}/dep_textwrap.py (100%) rename py/{impl/error.py => _error.py} (100%) rename py/{impl/io => _io}/__init__.py (100%) rename py/{impl/io => _io}/capture.py (100%) rename py/{impl/io => _io}/terminalwriter.py (100%) rename py/{impl/log => _log}/__init__.py (100%) rename py/{impl/log => _log}/log.py (100%) rename py/{impl/log => _log}/warning.py (100%) rename py/{impl/path => _path}/__init__.py (100%) rename py/{impl/path => _path}/cacheutil.py (100%) rename py/{impl/path => _path}/common.py (100%) rename py/{impl/path => _path}/gateway/__init__.py (100%) rename py/{impl/path => _path}/gateway/channeltest.py (100%) rename py/{impl/path => _path}/gateway/channeltest2.py (100%) rename py/{impl/path => _path}/gateway/remotepath.py (97%) rename py/{impl/path => _path}/local.py (99%) rename py/{impl/path => _path}/svnurl.py (99%) rename py/{impl/path => _path}/svnwc.py (99%) rename py/{plugin => _plugin}/__init__.py (100%) rename py/{plugin => _plugin}/hookspec.py (100%) rename py/{plugin => _plugin}/pytest__pytest.py (98%) rename py/{plugin => _plugin}/pytest_assertion.py (100%) rename py/{plugin => _plugin}/pytest_capture.py (100%) rename py/{plugin => _plugin}/pytest_default.py (98%) rename py/{plugin => _plugin}/pytest_doctest.py (98%) rename py/{plugin => _plugin}/pytest_genscript.py (100%) rename py/{plugin => _plugin}/pytest_helpconfig.py (100%) rename py/{plugin => _plugin}/pytest_hooklog.py (100%) rename py/{plugin => _plugin}/pytest_logxml.py (100%) rename py/{plugin => _plugin}/pytest_mark.py (100%) rename py/{plugin => _plugin}/pytest_monkeypatch.py (100%) rename py/{plugin => _plugin}/pytest_nose.py (100%) rename py/{plugin => _plugin}/pytest_pastebin.py (100%) rename py/{plugin => _plugin}/pytest_pdb.py (98%) rename py/{plugin => _plugin}/pytest_pylint.py (100%) rename py/{plugin => _plugin}/pytest_pytester.py (99%) rename py/{plugin => _plugin}/pytest_recwarn.py (100%) rename py/{plugin => _plugin}/pytest_restdoc.py (100%) rename py/{plugin => _plugin}/pytest_resultlog.py (100%) rename py/{plugin => _plugin}/pytest_runner.py (99%) rename py/{plugin => _plugin}/pytest_skipping.py (100%) rename py/{plugin => _plugin}/pytest_terminal.py (100%) rename py/{plugin => _plugin}/pytest_tmpdir.py (100%) rename py/{plugin => _plugin}/pytest_unittest.py (100%) rename py/{plugin => _plugin}/standalonetemplate.py (100%) rename py/{impl/process => _process}/__init__.py (100%) rename py/{impl/process => _process}/cmdexec.py (100%) rename py/{impl/process => _process}/forkedfunc.py (100%) rename py/{impl/process => _process}/killproc.py (100%) rename py/{impl/std.py => _std.py} (100%) rename py/{impl/test => _test}/__init__.py (100%) rename py/{impl/test => _test}/cmdline.py (100%) rename py/{impl/test => _test}/collect.py (100%) rename py/{impl/test => _test}/compat.py (100%) rename py/{impl/test => _test}/config.py (97%) rename py/{impl/test => _test}/conftesthandle.py (100%) rename py/{impl/test => _test}/funcargs.py (100%) rename py/{impl/test => _test}/outcome.py (100%) rename py/{impl/test => _test}/parseopt.py (100%) rename py/{impl/test => _test}/pluginmanager.py (98%) rename py/{impl/test => _test}/pycollect.py (99%) rename py/{impl/test => _test}/session.py (99%) rename py/{impl/xmlgen.py => _xmlgen.py} (100%) delete mode 100644 py/impl/__init__.py diff --git a/bin-for-dist/makepluginlist.py b/bin-for-dist/makepluginlist.py index bd0c4ad20..3238c957e 100644 --- a/bin-for-dist/makepluginlist.py +++ b/bin-for-dist/makepluginlist.py @@ -254,7 +254,7 @@ class PluginDoc(RestWriter): warn("missing docstring", func) def emit_options(self, plugin): - from py.impl.test.parseopt import Parser + from py._test.parseopt import Parser options = [] parser = Parser(processopt=options.append) if hasattr(plugin, 'pytest_addoption'): diff --git a/doc/confrest.py b/doc/confrest.py index 953840041..b228dfd36 100644 --- a/doc/confrest.py +++ b/doc/confrest.py @@ -1,6 +1,6 @@ import py -from py.plugin.pytest_restdoc import convert_rest_html, strip_html_header +from py._plugin.pytest_restdoc import convert_rest_html, strip_html_header html = py.xml.html diff --git a/doc/test/plugin/xdist.txt b/doc/test/plugin/xdist.txt index 2c54c27dc..0c23b1907 100644 --- a/doc/test/plugin/xdist.txt +++ b/doc/test/plugin/xdist.txt @@ -26,6 +26,7 @@ program source code to the remote place. All test results are reported back and displayed to your local test session. You may specify different Python versions and interpreters. +.. _`pytest-xdist`: http://pytest.org/plugin/xdist.html Usage examples --------------------- diff --git a/py/__init__.py b/py/__init__.py index 68afab0ab..66d049ade 100644 --- a/py/__init__.py +++ b/py/__init__.py @@ -15,164 +15,164 @@ import py.apipkg py.apipkg.initpkg(__name__, dict( # access to all standard lib modules - std = '.impl.std:std', + std = '._std:std', # access to all posix errno's as classes - error = '.impl.error:error', + error = '._error:error', - _pydir = '.impl._metainfo:pydir', + _pydir = '.__metainfo:pydir', version = 'py:__version__', # backward compatibility cmdline = { - 'pytest': '.impl.cmdline.pytest:main', - 'pylookup': '.impl.cmdline.pylookup:main', - 'pycountloc': '.impl.cmdline.pycountlog:main', - 'pytest': '.impl.test.cmdline:main', - 'pylookup': '.impl.cmdline.pylookup:main', - 'pycountloc': '.impl.cmdline.pycountloc:main', - 'pycleanup': '.impl.cmdline.pycleanup:main', - 'pywhich' : '.impl.cmdline.pywhich:main', - 'pysvnwcrevert' : '.impl.cmdline.pysvnwcrevert:main', - 'pyconvert_unittest' : '.impl.cmdline.pyconvert_unittest:main', + 'pytest': '._cmdline.pytest:main', + 'pylookup': '._cmdline.pylookup:main', + 'pycountloc': '._cmdline.pycountlog:main', + 'pytest': '._test.cmdline:main', + 'pylookup': '._cmdline.pylookup:main', + 'pycountloc': '._cmdline.pycountloc:main', + 'pycleanup': '._cmdline.pycleanup:main', + 'pywhich' : '._cmdline.pywhich:main', + 'pysvnwcrevert' : '._cmdline.pysvnwcrevert:main', + 'pyconvert_unittest' : '._cmdline.pyconvert_unittest:main', }, test = { # helpers for use from test functions or collectors - '__onfirstaccess__' : '.impl.test.config:onpytestaccess', - '__doc__' : '.impl.test:__doc__', - 'raises' : '.impl.test.outcome:raises', - 'skip' : '.impl.test.outcome:skip', - 'importorskip' : '.impl.test.outcome:importorskip', - 'fail' : '.impl.test.outcome:fail', - 'exit' : '.impl.test.outcome:exit', + '__onfirstaccess__' : '._test.config:onpytestaccess', + '__doc__' : '._test:__doc__', + 'raises' : '._test.outcome:raises', + 'skip' : '._test.outcome:skip', + 'importorskip' : '._test.outcome:importorskip', + 'fail' : '._test.outcome:fail', + 'exit' : '._test.outcome:exit', # configuration/initialization related test api - 'config' : '.impl.test.config:config_per_process', - 'ensuretemp' : '.impl.test.config:ensuretemp', + 'config' : '._test.config:config_per_process', + 'ensuretemp' : '._test.config:ensuretemp', 'collect': { - 'Collector' : '.impl.test.collect:Collector', - 'Directory' : '.impl.test.collect:Directory', - 'File' : '.impl.test.collect:File', - 'Item' : '.impl.test.collect:Item', - 'Module' : '.impl.test.pycollect:Module', - 'Class' : '.impl.test.pycollect:Class', - 'Instance' : '.impl.test.pycollect:Instance', - 'Generator' : '.impl.test.pycollect:Generator', - 'Function' : '.impl.test.pycollect:Function', - '_fillfuncargs' : '.impl.test.funcargs:fillfuncargs', + 'Collector' : '._test.collect:Collector', + 'Directory' : '._test.collect:Directory', + 'File' : '._test.collect:File', + 'Item' : '._test.collect:Item', + 'Module' : '._test.pycollect:Module', + 'Class' : '._test.pycollect:Class', + 'Instance' : '._test.pycollect:Instance', + 'Generator' : '._test.pycollect:Generator', + 'Function' : '._test.pycollect:Function', + '_fillfuncargs' : '._test.funcargs:fillfuncargs', }, 'cmdline': { - 'main' : '.impl.test.cmdline:main', # backward compat + 'main' : '._test.cmdline:main', # backward compat }, }, # hook into the top-level standard library process = { - '__doc__' : '.impl.process:__doc__', - 'cmdexec' : '.impl.process.cmdexec:cmdexec', - 'kill' : '.impl.process.killproc:kill', - 'ForkedFunc' : '.impl.process.forkedfunc:ForkedFunc', + '__doc__' : '._process:__doc__', + 'cmdexec' : '._process.cmdexec:cmdexec', + 'kill' : '._process.killproc:kill', + 'ForkedFunc' : '._process.forkedfunc:ForkedFunc', }, path = { - '__doc__' : '.impl.path:__doc__', - 'svnwc' : '.impl.path.svnwc:SvnWCCommandPath', - 'svnurl' : '.impl.path.svnurl:SvnCommandPath', - 'local' : '.impl.path.local:LocalPath', - 'SvnAuth' : '.impl.path.svnwc:SvnAuth', + '__doc__' : '._path:__doc__', + 'svnwc' : '._path.svnwc:SvnWCCommandPath', + 'svnurl' : '._path.svnurl:SvnCommandPath', + 'local' : '._path.local:LocalPath', + 'SvnAuth' : '._path.svnwc:SvnAuth', }, # some nice slightly magic APIs magic = { - 'invoke' : '.impl.code.oldmagic:invoke', - 'revoke' : '.impl.code.oldmagic:revoke', - 'patch' : '.impl.code.oldmagic:patch', - 'revert' : '.impl.code.oldmagic:revert', - 'autopath' : '.impl.path.local:autopath', - 'AssertionError' : '.impl.code.oldmagic2:AssertionError', + 'invoke' : '._code.oldmagic:invoke', + 'revoke' : '._code.oldmagic:revoke', + 'patch' : '._code.oldmagic:patch', + 'revert' : '._code.oldmagic:revert', + 'autopath' : '._path.local:autopath', + 'AssertionError' : '._code.oldmagic2:AssertionError', }, # python inspection/code-generation API code = { - '__doc__' : '.impl.code:__doc__', - 'compile' : '.impl.code.source:compile_', - 'Source' : '.impl.code.source:Source', - 'Code' : '.impl.code.code:Code', - 'Frame' : '.impl.code.code:Frame', - 'ExceptionInfo' : '.impl.code.code:ExceptionInfo', - 'Traceback' : '.impl.code.code:Traceback', - 'getfslineno' : '.impl.code.source:getfslineno', - 'getrawcode' : '.impl.code.code:getrawcode', - 'patch_builtins' : '.impl.code.code:patch_builtins', - 'unpatch_builtins' : '.impl.code.code:unpatch_builtins', - '_AssertionError' : '.impl.code.assertion:AssertionError', + '__doc__' : '._code:__doc__', + 'compile' : '._code.source:compile_', + 'Source' : '._code.source:Source', + 'Code' : '._code.code:Code', + 'Frame' : '._code.code:Frame', + 'ExceptionInfo' : '._code.code:ExceptionInfo', + 'Traceback' : '._code.code:Traceback', + 'getfslineno' : '._code.source:getfslineno', + 'getrawcode' : '._code.code:getrawcode', + 'patch_builtins' : '._code.code:patch_builtins', + 'unpatch_builtins' : '._code.code:unpatch_builtins', + '_AssertionError' : '._code.assertion:AssertionError', }, # backports and additions of builtins builtin = { - '__doc__' : '.impl.builtin:__doc__', - 'enumerate' : '.impl.builtin:enumerate', - 'reversed' : '.impl.builtin:reversed', - 'sorted' : '.impl.builtin:sorted', - 'set' : '.impl.builtin:set', - 'frozenset' : '.impl.builtin:frozenset', - 'BaseException' : '.impl.builtin:BaseException', - 'GeneratorExit' : '.impl.builtin:GeneratorExit', - 'print_' : '.impl.builtin:print_', - '_reraise' : '.impl.builtin:_reraise', - '_tryimport' : '.impl.builtin:_tryimport', - 'exec_' : '.impl.builtin:exec_', - '_basestring' : '.impl.builtin:_basestring', - '_totext' : '.impl.builtin:_totext', - '_isbytes' : '.impl.builtin:_isbytes', - '_istext' : '.impl.builtin:_istext', - '_getimself' : '.impl.builtin:_getimself', - '_getfuncdict' : '.impl.builtin:_getfuncdict', - 'builtins' : '.impl.builtin:builtins', - 'execfile' : '.impl.builtin:execfile', - 'callable' : '.impl.builtin:callable', + '__doc__' : '._builtin:__doc__', + 'enumerate' : '._builtin:enumerate', + 'reversed' : '._builtin:reversed', + 'sorted' : '._builtin:sorted', + 'set' : '._builtin:set', + 'frozenset' : '._builtin:frozenset', + 'BaseException' : '._builtin:BaseException', + 'GeneratorExit' : '._builtin:GeneratorExit', + 'print_' : '._builtin:print_', + '_reraise' : '._builtin:_reraise', + '_tryimport' : '._builtin:_tryimport', + 'exec_' : '._builtin:exec_', + '_basestring' : '._builtin:_basestring', + '_totext' : '._builtin:_totext', + '_isbytes' : '._builtin:_isbytes', + '_istext' : '._builtin:_istext', + '_getimself' : '._builtin:_getimself', + '_getfuncdict' : '._builtin:_getfuncdict', + 'builtins' : '._builtin:builtins', + 'execfile' : '._builtin:execfile', + 'callable' : '._builtin:callable', }, # input-output helping io = { - '__doc__' : '.impl.io:__doc__', - 'dupfile' : '.impl.io.capture:dupfile', - 'TextIO' : '.impl.io.capture:TextIO', - 'BytesIO' : '.impl.io.capture:BytesIO', - 'FDCapture' : '.impl.io.capture:FDCapture', - 'StdCapture' : '.impl.io.capture:StdCapture', - 'StdCaptureFD' : '.impl.io.capture:StdCaptureFD', - 'TerminalWriter' : '.impl.io.terminalwriter:TerminalWriter', + '__doc__' : '._io:__doc__', + 'dupfile' : '._io.capture:dupfile', + 'TextIO' : '._io.capture:TextIO', + 'BytesIO' : '._io.capture:BytesIO', + 'FDCapture' : '._io.capture:FDCapture', + 'StdCapture' : '._io.capture:StdCapture', + 'StdCaptureFD' : '._io.capture:StdCaptureFD', + 'TerminalWriter' : '._io.terminalwriter:TerminalWriter', }, # small and mean xml/html generation xml = { - '__doc__' : '.impl.xmlgen:__doc__', - 'html' : '.impl.xmlgen:html', - 'Tag' : '.impl.xmlgen:Tag', - 'raw' : '.impl.xmlgen:raw', - 'Namespace' : '.impl.xmlgen:Namespace', - 'escape' : '.impl.xmlgen:escape', + '__doc__' : '._xmlgen:__doc__', + 'html' : '._xmlgen:html', + 'Tag' : '._xmlgen:Tag', + 'raw' : '._xmlgen:raw', + 'Namespace' : '._xmlgen:Namespace', + 'escape' : '._xmlgen:escape', }, log = { # logging API ('producers' and 'consumers' connected via keywords) - '__doc__' : '.impl.log:__doc__', - '_apiwarn' : '.impl.log.warning:_apiwarn', - 'Producer' : '.impl.log.log:Producer', - 'setconsumer' : '.impl.log.log:setconsumer', - '_setstate' : '.impl.log.log:setstate', - '_getstate' : '.impl.log.log:getstate', - 'Path' : '.impl.log.log:Path', - 'STDOUT' : '.impl.log.log:STDOUT', - 'STDERR' : '.impl.log.log:STDERR', - 'Syslog' : '.impl.log.log:Syslog', + '__doc__' : '._log:__doc__', + '_apiwarn' : '._log.warning:_apiwarn', + 'Producer' : '._log.log:Producer', + 'setconsumer' : '._log.log:setconsumer', + '_setstate' : '._log.log:setstate', + '_getstate' : '._log.log:getstate', + 'Path' : '._log.log:Path', + 'STDOUT' : '._log.log:STDOUT', + 'STDERR' : '._log.log:STDERR', + 'Syslog' : '._log.log:Syslog', }, # compatibility modules (deprecated) compat = { - '__doc__' : '.impl.compat:__doc__', - 'doctest' : '.impl.compat.dep_doctest:doctest', - 'optparse' : '.impl.compat.dep_optparse:optparse', - 'textwrap' : '.impl.compat.dep_textwrap:textwrap', - 'subprocess' : '.impl.compat.dep_subprocess:subprocess', + '__doc__' : '._compat:__doc__', + 'doctest' : '._compat.dep_doctest:doctest', + 'optparse' : '._compat.dep_optparse:optparse', + 'textwrap' : '._compat.dep_textwrap:textwrap', + 'subprocess' : '._compat.dep_subprocess:subprocess', }, )) diff --git a/py/impl/_metainfo.py b/py/__metainfo.py similarity index 100% rename from py/impl/_metainfo.py rename to py/__metainfo.py diff --git a/py/impl/builtin.py b/py/_builtin.py similarity index 100% rename from py/impl/builtin.py rename to py/_builtin.py diff --git a/py/impl/cmdline/__init__.py b/py/_cmdline/__init__.py similarity index 100% rename from py/impl/cmdline/__init__.py rename to py/_cmdline/__init__.py diff --git a/py/impl/cmdline/pycleanup.py b/py/_cmdline/pycleanup.py similarity index 100% rename from py/impl/cmdline/pycleanup.py rename to py/_cmdline/pycleanup.py diff --git a/py/impl/cmdline/pyconvert_unittest.py b/py/_cmdline/pyconvert_unittest.py similarity index 100% rename from py/impl/cmdline/pyconvert_unittest.py rename to py/_cmdline/pyconvert_unittest.py diff --git a/py/impl/cmdline/pycountloc.py b/py/_cmdline/pycountloc.py similarity index 100% rename from py/impl/cmdline/pycountloc.py rename to py/_cmdline/pycountloc.py diff --git a/py/impl/cmdline/pylookup.py b/py/_cmdline/pylookup.py similarity index 97% rename from py/impl/cmdline/pylookup.py rename to py/_cmdline/pylookup.py index f0173f951..047117f09 100755 --- a/py/impl/cmdline/pylookup.py +++ b/py/_cmdline/pylookup.py @@ -9,7 +9,7 @@ prepended.""" import sys, os import py -from py.impl.io.terminalwriter import ansi_print, terminal_width +from py._io.terminalwriter import ansi_print, terminal_width import re def rec(p): diff --git a/py/impl/cmdline/pysvnwcrevert.py b/py/_cmdline/pysvnwcrevert.py similarity index 100% rename from py/impl/cmdline/pysvnwcrevert.py rename to py/_cmdline/pysvnwcrevert.py diff --git a/py/impl/cmdline/pytest.py b/py/_cmdline/pytest.py similarity index 100% rename from py/impl/cmdline/pytest.py rename to py/_cmdline/pytest.py diff --git a/py/impl/cmdline/pywhich.py b/py/_cmdline/pywhich.py similarity index 100% rename from py/impl/cmdline/pywhich.py rename to py/_cmdline/pywhich.py diff --git a/py/impl/code/__init__.py b/py/_code/__init__.py similarity index 100% rename from py/impl/code/__init__.py rename to py/_code/__init__.py diff --git a/py/impl/code/_assertionnew.py b/py/_code/_assertionnew.py similarity index 99% rename from py/impl/code/_assertionnew.py rename to py/_code/_assertionnew.py index 50727aeb6..3db9c0567 100644 --- a/py/impl/code/_assertionnew.py +++ b/py/_code/_assertionnew.py @@ -7,7 +7,7 @@ import sys import ast import py -from py.impl.code.assertion import _format_explanation, BuiltinAssertionError +from py._code.assertion import _format_explanation, BuiltinAssertionError if sys.platform.startswith("java") and sys.version_info < (2, 5, 2): diff --git a/py/impl/code/_assertionold.py b/py/_code/_assertionold.py similarity index 99% rename from py/impl/code/_assertionold.py rename to py/_code/_assertionold.py index 2602d508c..986b829fc 100644 --- a/py/impl/code/_assertionold.py +++ b/py/_code/_assertionold.py @@ -1,7 +1,7 @@ import py import sys, inspect from compiler import parse, ast, pycodegen -from py.impl.code.assertion import BuiltinAssertionError, _format_explanation +from py._code.assertion import BuiltinAssertionError, _format_explanation passthroughex = (KeyboardInterrupt, SystemExit, MemoryError) diff --git a/py/impl/code/assertion.py b/py/_code/assertion.py similarity index 95% rename from py/impl/code/assertion.py rename to py/_code/assertion.py index b5aea3424..965a2cce9 100644 --- a/py/impl/code/assertion.py +++ b/py/_code/assertion.py @@ -38,9 +38,9 @@ def _format_explanation(explanation): if sys.version_info >= (2, 6) or (sys.platform.startswith("java")): - from py.impl.code._assertionnew import interpret + from py._code._assertionnew import interpret else: - from py.impl.code._assertionold import interpret + from py._code._assertionold import interpret class AssertionError(BuiltinAssertionError): diff --git a/py/impl/code/code.py b/py/_code/code.py similarity index 99% rename from py/impl/code/code.py rename to py/_code/code.py index 9fbd2b41b..24f23d49e 100644 --- a/py/impl/code/code.py +++ b/py/_code/code.py @@ -87,7 +87,7 @@ class Code(object): def fullsource(self): """ return a py.code.Source object for the full source file of the code """ - from py.impl.code import source + from py._code import source full, _ = source.findsource(self.raw) return full fullsource = property(fullsource, None, None, @@ -199,7 +199,7 @@ class TracebackEntry(object): """Reinterpret the failing statement and returns a detailed information about what operations are performed.""" if self.exprinfo is None: - from py.impl.code import assertion + from py._code import assertion source = str(self.statement).strip() x = assertion.interpret(source, self.frame, should_fail=True) if not isinstance(x, str): @@ -742,7 +742,7 @@ oldbuiltins = {} def patch_builtins(assertion=True, compile=True): """ put compile and AssertionError builtins to Python's builtins. """ if assertion: - from py.impl.code import assertion + from py._code import assertion l = oldbuiltins.setdefault('AssertionError', []) l.append(py.builtin.builtins.AssertionError) py.builtin.builtins.AssertionError = assertion.AssertionError diff --git a/py/impl/code/oldmagic.py b/py/_code/oldmagic.py similarity index 100% rename from py/impl/code/oldmagic.py rename to py/_code/oldmagic.py diff --git a/py/impl/code/oldmagic2.py b/py/_code/oldmagic2.py similarity index 100% rename from py/impl/code/oldmagic2.py rename to py/_code/oldmagic2.py diff --git a/py/impl/code/source.py b/py/_code/source.py similarity index 100% rename from py/impl/code/source.py rename to py/_code/source.py diff --git a/py/impl/compat/__init__.py b/py/_compat/__init__.py similarity index 100% rename from py/impl/compat/__init__.py rename to py/_compat/__init__.py diff --git a/py/impl/compat/dep_doctest.py b/py/_compat/dep_doctest.py similarity index 100% rename from py/impl/compat/dep_doctest.py rename to py/_compat/dep_doctest.py diff --git a/py/impl/compat/dep_optparse.py b/py/_compat/dep_optparse.py similarity index 100% rename from py/impl/compat/dep_optparse.py rename to py/_compat/dep_optparse.py diff --git a/py/impl/compat/dep_subprocess.py b/py/_compat/dep_subprocess.py similarity index 100% rename from py/impl/compat/dep_subprocess.py rename to py/_compat/dep_subprocess.py diff --git a/py/impl/compat/dep_textwrap.py b/py/_compat/dep_textwrap.py similarity index 100% rename from py/impl/compat/dep_textwrap.py rename to py/_compat/dep_textwrap.py diff --git a/py/impl/error.py b/py/_error.py similarity index 100% rename from py/impl/error.py rename to py/_error.py diff --git a/py/impl/io/__init__.py b/py/_io/__init__.py similarity index 100% rename from py/impl/io/__init__.py rename to py/_io/__init__.py diff --git a/py/impl/io/capture.py b/py/_io/capture.py similarity index 100% rename from py/impl/io/capture.py rename to py/_io/capture.py diff --git a/py/impl/io/terminalwriter.py b/py/_io/terminalwriter.py similarity index 100% rename from py/impl/io/terminalwriter.py rename to py/_io/terminalwriter.py diff --git a/py/impl/log/__init__.py b/py/_log/__init__.py similarity index 100% rename from py/impl/log/__init__.py rename to py/_log/__init__.py diff --git a/py/impl/log/log.py b/py/_log/log.py similarity index 100% rename from py/impl/log/log.py rename to py/_log/log.py diff --git a/py/impl/log/warning.py b/py/_log/warning.py similarity index 100% rename from py/impl/log/warning.py rename to py/_log/warning.py diff --git a/py/impl/path/__init__.py b/py/_path/__init__.py similarity index 100% rename from py/impl/path/__init__.py rename to py/_path/__init__.py diff --git a/py/impl/path/cacheutil.py b/py/_path/cacheutil.py similarity index 100% rename from py/impl/path/cacheutil.py rename to py/_path/cacheutil.py diff --git a/py/impl/path/common.py b/py/_path/common.py similarity index 100% rename from py/impl/path/common.py rename to py/_path/common.py diff --git a/py/impl/path/gateway/__init__.py b/py/_path/gateway/__init__.py similarity index 100% rename from py/impl/path/gateway/__init__.py rename to py/_path/gateway/__init__.py diff --git a/py/impl/path/gateway/channeltest.py b/py/_path/gateway/channeltest.py similarity index 100% rename from py/impl/path/gateway/channeltest.py rename to py/_path/gateway/channeltest.py diff --git a/py/impl/path/gateway/channeltest2.py b/py/_path/gateway/channeltest2.py similarity index 100% rename from py/impl/path/gateway/channeltest2.py rename to py/_path/gateway/channeltest2.py diff --git a/py/impl/path/gateway/remotepath.py b/py/_path/gateway/remotepath.py similarity index 97% rename from py/impl/path/gateway/remotepath.py rename to py/_path/gateway/remotepath.py index 9b4287576..149baa435 100644 --- a/py/impl/path/gateway/remotepath.py +++ b/py/_path/gateway/remotepath.py @@ -1,5 +1,5 @@ import py, itertools -from py.impl.path import common +from py._path import common COUNTER = itertools.count() diff --git a/py/impl/path/local.py b/py/_path/local.py similarity index 99% rename from py/impl/path/local.py rename to py/_path/local.py index cfdff6de7..82e93b8d2 100644 --- a/py/impl/path/local.py +++ b/py/_path/local.py @@ -3,7 +3,7 @@ local path implementation. """ import sys, os, stat, re, atexit import py -from py.impl.path import common +from py._path import common iswin32 = sys.platform == "win32" diff --git a/py/impl/path/svnurl.py b/py/_path/svnurl.py similarity index 99% rename from py/impl/path/svnurl.py rename to py/_path/svnurl.py index 3981326ab..93d168a9c 100644 --- a/py/impl/path/svnurl.py +++ b/py/_path/svnurl.py @@ -7,9 +7,9 @@ but might also interact well with earlier versions. import os, sys, time, re import py from py import path, process -from py.impl.path import common -from py.impl.path import svnwc as svncommon -from py.impl.path.cacheutil import BuildcostAccessCache, AgingCache +from py._path import common +from py._path import svnwc as svncommon +from py._path.cacheutil import BuildcostAccessCache, AgingCache DEBUG=False diff --git a/py/impl/path/svnwc.py b/py/_path/svnwc.py similarity index 99% rename from py/impl/path/svnwc.py rename to py/_path/svnwc.py index 4d9571c48..5a25d0f23 100644 --- a/py/impl/path/svnwc.py +++ b/py/_path/svnwc.py @@ -8,7 +8,7 @@ svn-Command based Implementation of a Subversion WorkingCopy Path. import os, sys, time, re, calendar import py import subprocess -from py.impl.path import common +from py._path import common #----------------------------------------------------------- # Caching latest repository revision and repo-paths diff --git a/py/plugin/__init__.py b/py/_plugin/__init__.py similarity index 100% rename from py/plugin/__init__.py rename to py/_plugin/__init__.py diff --git a/py/plugin/hookspec.py b/py/_plugin/hookspec.py similarity index 100% rename from py/plugin/hookspec.py rename to py/_plugin/hookspec.py diff --git a/py/plugin/pytest__pytest.py b/py/_plugin/pytest__pytest.py similarity index 98% rename from py/plugin/pytest__pytest.py rename to py/_plugin/pytest__pytest.py index 380ea5468..430ea3ca0 100644 --- a/py/plugin/pytest__pytest.py +++ b/py/_plugin/pytest__pytest.py @@ -1,6 +1,6 @@ import py -from py.impl.test.pluginmanager import HookRelay +from py._test.pluginmanager import HookRelay def pytest_funcarg___pytest(request): return PytestArg(request) diff --git a/py/plugin/pytest_assertion.py b/py/_plugin/pytest_assertion.py similarity index 100% rename from py/plugin/pytest_assertion.py rename to py/_plugin/pytest_assertion.py diff --git a/py/plugin/pytest_capture.py b/py/_plugin/pytest_capture.py similarity index 100% rename from py/plugin/pytest_capture.py rename to py/_plugin/pytest_capture.py diff --git a/py/plugin/pytest_default.py b/py/_plugin/pytest_default.py similarity index 98% rename from py/plugin/pytest_default.py rename to py/_plugin/pytest_default.py index 4dcb44dd5..9bc2dce5b 100644 --- a/py/plugin/pytest_default.py +++ b/py/_plugin/pytest_default.py @@ -75,7 +75,7 @@ def pytest_configure(config): def setsession(config): val = config.getvalue if val("collectonly"): - from py.impl.test.session import Session + from py._test.session import Session config.setsessionclass(Session) # pycollect related hooks and code, should move to pytest_pycollect.py diff --git a/py/plugin/pytest_doctest.py b/py/_plugin/pytest_doctest.py similarity index 98% rename from py/plugin/pytest_doctest.py rename to py/_plugin/pytest_doctest.py index 934c4da21..1f30d217b 100644 --- a/py/plugin/pytest_doctest.py +++ b/py/_plugin/pytest_doctest.py @@ -23,7 +23,7 @@ putting them into a conftest.py file like this:: """ import py -from py.impl.code.code import TerminalRepr, ReprFileLocation +from py._code.code import TerminalRepr, ReprFileLocation import doctest def pytest_addoption(parser): diff --git a/py/plugin/pytest_genscript.py b/py/_plugin/pytest_genscript.py similarity index 100% rename from py/plugin/pytest_genscript.py rename to py/_plugin/pytest_genscript.py diff --git a/py/plugin/pytest_helpconfig.py b/py/_plugin/pytest_helpconfig.py similarity index 100% rename from py/plugin/pytest_helpconfig.py rename to py/_plugin/pytest_helpconfig.py diff --git a/py/plugin/pytest_hooklog.py b/py/_plugin/pytest_hooklog.py similarity index 100% rename from py/plugin/pytest_hooklog.py rename to py/_plugin/pytest_hooklog.py diff --git a/py/plugin/pytest_logxml.py b/py/_plugin/pytest_logxml.py similarity index 100% rename from py/plugin/pytest_logxml.py rename to py/_plugin/pytest_logxml.py diff --git a/py/plugin/pytest_mark.py b/py/_plugin/pytest_mark.py similarity index 100% rename from py/plugin/pytest_mark.py rename to py/_plugin/pytest_mark.py diff --git a/py/plugin/pytest_monkeypatch.py b/py/_plugin/pytest_monkeypatch.py similarity index 100% rename from py/plugin/pytest_monkeypatch.py rename to py/_plugin/pytest_monkeypatch.py diff --git a/py/plugin/pytest_nose.py b/py/_plugin/pytest_nose.py similarity index 100% rename from py/plugin/pytest_nose.py rename to py/_plugin/pytest_nose.py diff --git a/py/plugin/pytest_pastebin.py b/py/_plugin/pytest_pastebin.py similarity index 100% rename from py/plugin/pytest_pastebin.py rename to py/_plugin/pytest_pastebin.py diff --git a/py/plugin/pytest_pdb.py b/py/_plugin/pytest_pdb.py similarity index 98% rename from py/plugin/pytest_pdb.py rename to py/_plugin/pytest_pdb.py index 7f452cc88..8ee157efb 100644 --- a/py/plugin/pytest_pdb.py +++ b/py/_plugin/pytest_pdb.py @@ -3,7 +3,7 @@ interactive debugging with the Python Debugger. """ import py import pdb, sys, linecache -from py.impl.test.outcome import Skipped +from py._test.outcome import Skipped def pytest_addoption(parser): group = parser.getgroup("general") diff --git a/py/plugin/pytest_pylint.py b/py/_plugin/pytest_pylint.py similarity index 100% rename from py/plugin/pytest_pylint.py rename to py/_plugin/pytest_pylint.py diff --git a/py/plugin/pytest_pytester.py b/py/_plugin/pytest_pytester.py similarity index 99% rename from py/plugin/pytest_pytester.py rename to py/_plugin/pytest_pytester.py index 6cc2b8f73..51ced5544 100644 --- a/py/plugin/pytest_pytester.py +++ b/py/_plugin/pytest_pytester.py @@ -7,8 +7,7 @@ import sys, os import re import inspect import time -from py.impl.test.config import Config as pytestConfig -from py.plugin import hookspec +from py._test.config import Config as pytestConfig from py.builtin import print_ def pytest_addoption(parser): @@ -219,7 +218,7 @@ class TmpTestdir: """ this is used from tests that want to re-invoke parse(). """ if not args: args = [self.tmpdir] - from py.impl.test import config + from py._test import config oldconfig = py.test.config try: c = config.config_per_process = py.test.config = pytestConfig() diff --git a/py/plugin/pytest_recwarn.py b/py/_plugin/pytest_recwarn.py similarity index 100% rename from py/plugin/pytest_recwarn.py rename to py/_plugin/pytest_recwarn.py diff --git a/py/plugin/pytest_restdoc.py b/py/_plugin/pytest_restdoc.py similarity index 100% rename from py/plugin/pytest_restdoc.py rename to py/_plugin/pytest_restdoc.py diff --git a/py/plugin/pytest_resultlog.py b/py/_plugin/pytest_resultlog.py similarity index 100% rename from py/plugin/pytest_resultlog.py rename to py/_plugin/pytest_resultlog.py diff --git a/py/plugin/pytest_runner.py b/py/_plugin/pytest_runner.py similarity index 99% rename from py/plugin/pytest_runner.py rename to py/_plugin/pytest_runner.py index cfce3b9cb..6e599cf34 100644 --- a/py/plugin/pytest_runner.py +++ b/py/_plugin/pytest_runner.py @@ -3,7 +3,7 @@ collect and run test items and create reports. """ import py -from py.impl.test.outcome import Skipped +from py._test.outcome import Skipped # # pytest plugin hooks diff --git a/py/plugin/pytest_skipping.py b/py/_plugin/pytest_skipping.py similarity index 100% rename from py/plugin/pytest_skipping.py rename to py/_plugin/pytest_skipping.py diff --git a/py/plugin/pytest_terminal.py b/py/_plugin/pytest_terminal.py similarity index 100% rename from py/plugin/pytest_terminal.py rename to py/_plugin/pytest_terminal.py diff --git a/py/plugin/pytest_tmpdir.py b/py/_plugin/pytest_tmpdir.py similarity index 100% rename from py/plugin/pytest_tmpdir.py rename to py/_plugin/pytest_tmpdir.py diff --git a/py/plugin/pytest_unittest.py b/py/_plugin/pytest_unittest.py similarity index 100% rename from py/plugin/pytest_unittest.py rename to py/_plugin/pytest_unittest.py diff --git a/py/plugin/standalonetemplate.py b/py/_plugin/standalonetemplate.py similarity index 100% rename from py/plugin/standalonetemplate.py rename to py/_plugin/standalonetemplate.py diff --git a/py/impl/process/__init__.py b/py/_process/__init__.py similarity index 100% rename from py/impl/process/__init__.py rename to py/_process/__init__.py diff --git a/py/impl/process/cmdexec.py b/py/_process/cmdexec.py similarity index 100% rename from py/impl/process/cmdexec.py rename to py/_process/cmdexec.py diff --git a/py/impl/process/forkedfunc.py b/py/_process/forkedfunc.py similarity index 100% rename from py/impl/process/forkedfunc.py rename to py/_process/forkedfunc.py diff --git a/py/impl/process/killproc.py b/py/_process/killproc.py similarity index 100% rename from py/impl/process/killproc.py rename to py/_process/killproc.py diff --git a/py/impl/std.py b/py/_std.py similarity index 100% rename from py/impl/std.py rename to py/_std.py diff --git a/py/impl/test/__init__.py b/py/_test/__init__.py similarity index 100% rename from py/impl/test/__init__.py rename to py/_test/__init__.py diff --git a/py/impl/test/cmdline.py b/py/_test/cmdline.py similarity index 100% rename from py/impl/test/cmdline.py rename to py/_test/cmdline.py diff --git a/py/impl/test/collect.py b/py/_test/collect.py similarity index 100% rename from py/impl/test/collect.py rename to py/_test/collect.py diff --git a/py/impl/test/compat.py b/py/_test/compat.py similarity index 100% rename from py/impl/test/compat.py rename to py/_test/compat.py diff --git a/py/impl/test/config.py b/py/_test/config.py similarity index 97% rename from py/impl/test/config.py rename to py/_test/config.py index ba787deae..831d17b83 100644 --- a/py/impl/test/config.py +++ b/py/_test/config.py @@ -1,8 +1,8 @@ import py, os -from py.impl.test.conftesthandle import Conftest -from py.impl.test.pluginmanager import PluginManager -from py.impl.test import parseopt -from py.impl.test.collect import RootCollector +from py._test.conftesthandle import Conftest +from py._test.pluginmanager import PluginManager +from py._test import parseopt +from py._test.collect import RootCollector def ensuretemp(string, dir=1): """ (deprecated) return temporary directory path with @@ -249,7 +249,7 @@ class Config(object): """ return an initialized session object. """ cls = self._sessionclass if cls is None: - from py.impl.test.session import Session + from py._test.session import Session cls = Session session = cls(self) self.trace("instantiated session %r" % session) diff --git a/py/impl/test/conftesthandle.py b/py/_test/conftesthandle.py similarity index 100% rename from py/impl/test/conftesthandle.py rename to py/_test/conftesthandle.py diff --git a/py/impl/test/funcargs.py b/py/_test/funcargs.py similarity index 100% rename from py/impl/test/funcargs.py rename to py/_test/funcargs.py diff --git a/py/impl/test/outcome.py b/py/_test/outcome.py similarity index 100% rename from py/impl/test/outcome.py rename to py/_test/outcome.py diff --git a/py/impl/test/parseopt.py b/py/_test/parseopt.py similarity index 100% rename from py/impl/test/parseopt.py rename to py/_test/parseopt.py diff --git a/py/impl/test/pluginmanager.py b/py/_test/pluginmanager.py similarity index 98% rename from py/impl/test/pluginmanager.py rename to py/_test/pluginmanager.py index f40a7134d..d66b567ac 100644 --- a/py/impl/test/pluginmanager.py +++ b/py/_test/pluginmanager.py @@ -3,8 +3,8 @@ managing loading and interacting with pytest plugins. """ import py import inspect -from py.plugin import hookspec -from py.impl.test.outcome import Skipped +from py._plugin import hookspec +from py._test.outcome import Skipped default_plugins = ( "default runner capture terminal mark skipping tmpdir monkeypatch " @@ -210,7 +210,7 @@ def importplugin(importspec): if str(e).find(importspec) == -1: raise try: - return __import__("py.plugin.%s" %(importspec), + return __import__("py._plugin.%s" %(importspec), None, None, '__doc__') except ImportError: e = py.std.sys.exc_info()[1] diff --git a/py/impl/test/pycollect.py b/py/_test/pycollect.py similarity index 99% rename from py/impl/test/pycollect.py rename to py/_test/pycollect.py index a599e4d1f..db4094915 100644 --- a/py/impl/test/pycollect.py +++ b/py/_test/pycollect.py @@ -3,8 +3,8 @@ Python related collection nodes. """ import py import inspect -from py.impl.test.collect import configproperty, warnoldcollect -from py.impl.test import funcargs +from py._test.collect import configproperty, warnoldcollect +from py._test import funcargs class PyobjMixin(object): def obj(): diff --git a/py/impl/test/session.py b/py/_test/session.py similarity index 99% rename from py/impl/test/session.py rename to py/_test/session.py index 4e649844c..6eb1c9cbb 100644 --- a/py/impl/test/session.py +++ b/py/_test/session.py @@ -6,7 +6,7 @@ """ import py -from py.impl.test import outcome +from py._test import outcome # imports used for genitems() Item = py.test.collect.Item diff --git a/py/impl/xmlgen.py b/py/_xmlgen.py similarity index 100% rename from py/impl/xmlgen.py rename to py/_xmlgen.py diff --git a/py/impl/__init__.py b/py/impl/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/setup.py b/setup.py index 6f8acb5a4..00ef28c64 100644 --- a/setup.py +++ b/setup.py @@ -45,16 +45,15 @@ def main(): 'Topic :: Utilities', 'Programming Language :: Python'], packages=['py', - 'py.plugin', - 'py.impl', - 'py.impl.cmdline', - 'py.impl.code', - 'py.impl.compat', - 'py.impl.io', - 'py.impl.log', - 'py.impl.path', - 'py.impl.process', - 'py.impl.test', + 'py._plugin', + 'py._cmdline', + 'py._code', + 'py._compat', + 'py._io', + 'py._log', + 'py._path', + 'py._process', + 'py._test', ], zip_safe=False, ) diff --git a/testing/cmdline/test_convert_unittest.py b/testing/cmdline/test_convert_unittest.py index ae5a3f4b6..48280c7c1 100644 --- a/testing/cmdline/test_convert_unittest.py +++ b/testing/cmdline/test_convert_unittest.py @@ -1,4 +1,4 @@ -from py.impl.cmdline.pyconvert_unittest import rewrite_utest +from py._cmdline.pyconvert_unittest import rewrite_utest class Test_UTestConvert: diff --git a/testing/code/test_assertion.py b/testing/code/test_assertion.py index ba9c9de76..dcecae220 100644 --- a/testing/code/test_assertion.py +++ b/testing/code/test_assertion.py @@ -145,7 +145,7 @@ def test_assert_with_brokenrepr_arg(): class TestView: def setup_class(cls): - cls.View = py.test.importorskip("py.impl.code._assertionold").View + cls.View = py.test.importorskip("py._code._assertionold").View def test_class_dispatch(self): ### Use a custom class hierarchy with existing instances diff --git a/testing/code/test_code.py b/testing/code/test_code.py index 9cae15a45..f9f478aa9 100644 --- a/testing/code/test_code.py +++ b/testing/code/test_code.py @@ -1,7 +1,7 @@ from __future__ import generators import py import sys -from py.impl.code.code import safe_repr +from py._code.code import safe_repr failsonjython = py.test.mark.xfail("sys.platform.startswith('java')") @@ -163,7 +163,7 @@ class TestSafeRepr: assert 'TypeError' in safe_repr(BrokenRepr("string")) def test_big_repr(self): - from py.impl.code.code import SafeRepr + from py._code.code import SafeRepr assert len(safe_repr(range(1000))) <= \ len('[' + SafeRepr().maxlist * "1000" + ']') diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index 022d7bf97..41ebdeded 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -1,6 +1,6 @@ import py -from py.impl.code.code import FormattedExcinfo, ReprExceptionInfo +from py._code.code import FormattedExcinfo, ReprExceptionInfo queue = py.builtin._tryimport('queue', 'Queue') class TWMock: diff --git a/testing/code/test_source.py b/testing/code/test_source.py index c654ef1ba..d65b45c64 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -290,7 +290,7 @@ def test_getfuncsource_with_multine_string(): def test_deindent(): - from py.impl.code.source import deindent as deindent + from py._code.source import deindent as deindent assert deindent(['\tfoo', '\tbar', ]) == ['foo', 'bar'] def f(): @@ -328,27 +328,27 @@ if True: pass def test_getsource_fallback(): - from py.impl.code.source import getsource + from py._code.source import getsource expected = """def x(): pass""" src = getsource(x) assert src == expected def test_idem_compile_and_getsource(): - from py.impl.code.source import getsource + from py._code.source import getsource expected = "def x(): pass" co = py.code.compile(expected) src = getsource(co) assert src == expected def test_findsource_fallback(): - from py.impl.code.source import findsource + from py._code.source import findsource src, lineno = findsource(x) assert 'test_findsource_simple' in str(src) assert src[lineno] == ' def x():' def test_findsource___source__(): - from py.impl.code.source import findsource + from py._code.source import findsource co = py.code.compile("""if 1: def x(): pass diff --git a/testing/io_/test_capture.py b/testing/io_/test_capture.py index bcd85c3f2..03e1b108b 100644 --- a/testing/io_/test_capture.py +++ b/testing/io_/test_capture.py @@ -58,7 +58,7 @@ def test_bytes_io(): assert s == tobytes("hello") def test_dontreadfrominput(): - from py.impl.io.capture import DontReadFromInput + from py._io.capture import DontReadFromInput f = DontReadFromInput() assert not f.isatty() py.test.raises(IOError, f.read) diff --git a/testing/io_/test_terminalwriter.py b/testing/io_/test_terminalwriter.py index c13ae2ee4..644c91186 100644 --- a/testing/io_/test_terminalwriter.py +++ b/testing/io_/test_terminalwriter.py @@ -1,6 +1,6 @@ import py import os, sys -from py.impl.io import terminalwriter +from py._io import terminalwriter def test_terminal_width_COLUMNS(monkeypatch): """ Dummy test for get_terminal_width diff --git a/testing/log/test_log.py b/testing/log/test_log.py index 39c32740e..da1f53799 100644 --- a/testing/log/test_log.py +++ b/testing/log/test_log.py @@ -1,7 +1,7 @@ import py import sys -from py.impl.log.log import default_keywordmapper +from py._log.log import default_keywordmapper callcapture = py.io.StdCapture.call diff --git a/testing/path/conftest.py b/testing/path/conftest.py index c47d7c4d5..355cf1310 100644 --- a/testing/path/conftest.py +++ b/testing/path/conftest.py @@ -1,6 +1,6 @@ import py import sys -from py.impl.path import svnwc as svncommon +from py._path import svnwc as svncommon svnbin = py.path.local.sysfind('svn') repodump = py.path.local(__file__).dirpath('repotest.dump') diff --git a/testing/path/svntestbase.py b/testing/path/svntestbase.py index ebafe920c..e28bb994a 100644 --- a/testing/path/svntestbase.py +++ b/testing/path/svntestbase.py @@ -1,6 +1,6 @@ import sys import py -from py.impl.path import svnwc as svncommon +from py._path import svnwc as svncommon from testing.path.common import CommonFSTests class CommonSvnTests(CommonFSTests): diff --git a/testing/path/test_cacheutil.py b/testing/path/test_cacheutil.py index 0c9f0a526..af1d0a937 100644 --- a/testing/path/test_cacheutil.py +++ b/testing/path/test_cacheutil.py @@ -1,5 +1,5 @@ import py -from py.impl.path import cacheutil +from py._path import cacheutil class BasicCacheAPITest: cache = None diff --git a/testing/path/test_svnurl.py b/testing/path/test_svnurl.py index 4889b2dc7..82dce22d4 100644 --- a/testing/path/test_svnurl.py +++ b/testing/path/test_svnurl.py @@ -1,5 +1,5 @@ import py -from py.impl.path.svnurl import InfoSvnCommand +from py._path.svnurl import InfoSvnCommand import datetime import time from testing.path.svntestbase import CommonSvnTests diff --git a/testing/path/test_svnwc.py b/testing/path/test_svnwc.py index 1d9e083a4..7b8c97666 100644 --- a/testing/path/test_svnwc.py +++ b/testing/path/test_svnwc.py @@ -1,7 +1,7 @@ import py import os, sys -from py.impl.path.svnwc import InfoSvnWCCommand, XMLWCStatus, parse_wcinfotime -from py.impl.path import svnwc as svncommon +from py._path.svnwc import InfoSvnWCCommand, XMLWCStatus, parse_wcinfotime +from py._path import svnwc as svncommon from testing.path.svntestbase import CommonSvnTests def test_make_repo(path1, tmpdir): diff --git a/testing/plugin/conftest.py b/testing/plugin/conftest.py index 092d9d417..f5b34cc56 100644 --- a/testing/plugin/conftest.py +++ b/testing/plugin/conftest.py @@ -1,9 +1,9 @@ import py pytest_plugins = "pytester" -import py.plugin -plugindir = py.path.local(py.plugin.__file__).dirpath() -from py.impl.test.pluginmanager import default_plugins +import py._plugin +plugindir = py.path.local(py._plugin.__file__).dirpath() +from py._test.pluginmanager import default_plugins def pytest_collect_file(path, parent): if path.basename.startswith("pytest_") and path.ext == ".py": diff --git a/testing/plugin/test_pytest__pytest.py b/testing/plugin/test_pytest__pytest.py index 17f1c4ea4..d9fbf31d8 100644 --- a/testing/plugin/test_pytest__pytest.py +++ b/testing/plugin/test_pytest__pytest.py @@ -1,7 +1,7 @@ import py import sys -from py.plugin.pytest__pytest import HookRecorder -from py.impl.test.pluginmanager import Registry +from py._plugin.pytest__pytest import HookRecorder +from py._test.pluginmanager import Registry def test_hookrecorder_basic(): rec = HookRecorder(Registry()) @@ -29,7 +29,7 @@ def test_hookrecorder_basic_no_args_hook(): def test_functional(testdir, linecomp): reprec = testdir.inline_runsource(""" import py - from py.impl.test.pluginmanager import HookRelay, Registry + from py._test.pluginmanager import HookRelay, Registry pytest_plugins="_pytest" def test_func(_pytest): class ApiClass: diff --git a/testing/plugin/test_pytest_capture.py b/testing/plugin/test_pytest_capture.py index 93796f904..d8870badb 100644 --- a/testing/plugin/test_pytest_capture.py +++ b/testing/plugin/test_pytest_capture.py @@ -1,5 +1,5 @@ import py, os, sys -from py.plugin.pytest_capture import CaptureManager +from py._plugin.pytest_capture import CaptureManager needsosdup = py.test.mark.xfail("not hasattr(os, 'dup')") diff --git a/testing/plugin/test_pytest_default.py b/testing/plugin/test_pytest_default.py index 33cb57ddd..4a85ad6be 100644 --- a/testing/plugin/test_pytest_default.py +++ b/testing/plugin/test_pytest_default.py @@ -1,5 +1,5 @@ import py -from py.plugin.pytest_default import pytest_report_iteminfo +from py._plugin.pytest_default import pytest_report_iteminfo def test_plugin_specify(testdir): testdir.chdir() diff --git a/testing/plugin/test_pytest_doctest.py b/testing/plugin/test_pytest_doctest.py index 3ce07fec2..b280b6447 100644 --- a/testing/plugin/test_pytest_doctest.py +++ b/testing/plugin/test_pytest_doctest.py @@ -1,4 +1,4 @@ -from py.plugin.pytest_doctest import DoctestModule, DoctestTextfile +from py._plugin.pytest_doctest import DoctestModule, DoctestTextfile pytest_plugins = ["pytest_doctest"] @@ -45,7 +45,7 @@ class TestDoctests: reprec.assertoutcome(failed=1) def test_doctest_unexpected_exception(self, testdir): - from py.impl.test.outcome import Failed + from py._test.outcome import Failed p = testdir.maketxtfile(""" >>> i = 0 diff --git a/testing/plugin/test_pytest_helpconfig.py b/testing/plugin/test_pytest_helpconfig.py index 51752bce7..dc3b6a598 100644 --- a/testing/plugin/test_pytest_helpconfig.py +++ b/testing/plugin/test_pytest_helpconfig.py @@ -1,5 +1,5 @@ import py, os -from py.plugin.pytest_helpconfig import collectattr +from py._plugin.pytest_helpconfig import collectattr def test_version(testdir): assert py.version == py.__version__ diff --git a/testing/plugin/test_pytest_mark.py b/testing/plugin/test_pytest_mark.py index 908dd2783..68886ba67 100644 --- a/testing/plugin/test_pytest_mark.py +++ b/testing/plugin/test_pytest_mark.py @@ -1,5 +1,5 @@ import py -from py.plugin.pytest_mark import MarkGenerator as Mark +from py._plugin.pytest_mark import MarkGenerator as Mark class TestMark: def test_pytest_mark_notcallable(self): diff --git a/testing/plugin/test_pytest_monkeypatch.py b/testing/plugin/test_pytest_monkeypatch.py index e7cf16d42..97d57e9c3 100644 --- a/testing/plugin/test_pytest_monkeypatch.py +++ b/testing/plugin/test_pytest_monkeypatch.py @@ -1,6 +1,6 @@ import os, sys import py -from py.plugin.pytest_monkeypatch import MonkeyPatch +from py._plugin.pytest_monkeypatch import MonkeyPatch def test_setattr(): class A: diff --git a/testing/plugin/test_pytest_pytester.py b/testing/plugin/test_pytest_pytester.py index c9cac83f2..9aef4a0e6 100644 --- a/testing/plugin/test_pytest_pytester.py +++ b/testing/plugin/test_pytest_pytester.py @@ -1,5 +1,5 @@ import py -from py.plugin.pytest_pytester import LineMatcher, LineComp +from py._plugin.pytest_pytester import LineMatcher, LineComp def test_reportrecorder(testdir): item = testdir.getitem("def test_func(): pass") diff --git a/testing/plugin/test_pytest_recwarn.py b/testing/plugin/test_pytest_recwarn.py index 20a29bad8..6c004e9f0 100644 --- a/testing/plugin/test_pytest_recwarn.py +++ b/testing/plugin/test_pytest_recwarn.py @@ -1,5 +1,5 @@ import py -from py.plugin.pytest_recwarn import WarningsRecorder +from py._plugin.pytest_recwarn import WarningsRecorder def test_WarningRecorder(): showwarning = py.std.warnings.showwarning diff --git a/testing/plugin/test_pytest_restdoc.py b/testing/plugin/test_pytest_restdoc.py index e26300a56..daf09cf15 100644 --- a/testing/plugin/test_pytest_restdoc.py +++ b/testing/plugin/test_pytest_restdoc.py @@ -1,5 +1,5 @@ import py -from py.plugin.pytest_restdoc import deindent +from py._plugin.pytest_restdoc import deindent def test_deindent(): assert deindent('foo') == 'foo' @@ -18,7 +18,7 @@ class TestDoctest: testdir.plugins.append("restdoc") assert request.module.__name__ == __name__ testdir.makepyfile(confrest= - "from py.plugin.pytest_restdoc import Project") + "from py._plugin.pytest_restdoc import Project") # we scope our confrest file so that it doesn't # conflict with another global confrest.py testdir.makepyfile(__init__="") diff --git a/testing/plugin/test_pytest_resultlog.py b/testing/plugin/test_pytest_resultlog.py index 855737c05..0ce1f46c1 100644 --- a/testing/plugin/test_pytest_resultlog.py +++ b/testing/plugin/test_pytest_resultlog.py @@ -1,7 +1,7 @@ import py import os -from py.plugin.pytest_resultlog import generic_path, ResultLog -from py.impl.test.collect import Node, Item, FSCollector +from py._plugin.pytest_resultlog import generic_path, ResultLog +from py._test.collect import Node, Item, FSCollector def test_generic_path(testdir): config = testdir.parseconfig() diff --git a/testing/plugin/test_pytest_runner.py b/testing/plugin/test_pytest_runner.py index a9e28e82d..4764de98d 100644 --- a/testing/plugin/test_pytest_runner.py +++ b/testing/plugin/test_pytest_runner.py @@ -1,6 +1,6 @@ import py -from py.plugin import pytest_runner as runner -from py.impl.code.code import ReprExceptionInfo +from py._plugin import pytest_runner as runner +from py._code.code import ReprExceptionInfo class TestSetupState: def test_setup(self, testdir): @@ -187,10 +187,10 @@ class BaseFunctionalTests: assert rep.when == "call" def test_exit_propagates(self, testdir): - from py.impl.test.outcome import Exit + from py._test.outcome import Exit try: testdir.runitem(""" - from py.impl.test.outcome import Exit + from py._test.outcome import Exit def test_func(): raise Exit() """) @@ -206,7 +206,7 @@ class TestExecutionNonForked(BaseFunctionalTests): return f def test_keyboardinterrupt_propagates(self, testdir): - from py.impl.test.outcome import Exit + from py._test.outcome import Exit try: testdir.runitem(""" def test_func(): diff --git a/testing/plugin/test_pytest_skipping.py b/testing/plugin/test_pytest_skipping.py index 74d860ab5..f90c358f6 100644 --- a/testing/plugin/test_pytest_skipping.py +++ b/testing/plugin/test_pytest_skipping.py @@ -104,7 +104,7 @@ def test_skipif_class(testdir): ]) def test_evalexpression_cls_config_example(testdir): - from py.plugin.pytest_skipping import evalexpression + from py._plugin.pytest_skipping import evalexpression item, = testdir.getitems(""" import py class TestClass: @@ -118,8 +118,8 @@ def test_evalexpression_cls_config_example(testdir): assert y == 3 def test_skip_reasons_folding(): - from py.plugin import pytest_runner as runner - from py.plugin.pytest_skipping import folded_skips + from py._plugin import pytest_runner as runner + from py._plugin.pytest_skipping import folded_skips class longrepr: class reprcrash: path = 'xyz' diff --git a/testing/plugin/test_pytest_terminal.py b/testing/plugin/test_pytest_terminal.py index b12c065ce..e60679292 100644 --- a/testing/plugin/test_pytest_terminal.py +++ b/testing/plugin/test_pytest_terminal.py @@ -9,9 +9,9 @@ import sys # # =============================================================================== -from py.plugin.pytest_terminal import TerminalReporter, \ +from py._plugin.pytest_terminal import TerminalReporter, \ CollectonlyReporter, repr_pythonversion, getreportopt -from py.plugin import pytest_runner as runner +from py._plugin import pytest_runner as runner def basic_run_report(item): return runner.call_and_report(item, "call", log=False) diff --git a/testing/plugin/test_pytest_tmpdir.py b/testing/plugin/test_pytest_tmpdir.py index a3a9ae76f..a89405cd7 100644 --- a/testing/plugin/test_pytest_tmpdir.py +++ b/testing/plugin/test_pytest_tmpdir.py @@ -1,7 +1,7 @@ -from py.plugin.pytest_tmpdir import pytest_funcarg__tmpdir +from py._plugin.pytest_tmpdir import pytest_funcarg__tmpdir def test_funcarg(testdir): - from py.impl.test.funcargs import FuncargRequest + from py._test.funcargs import FuncargRequest item = testdir.getitem("def test_func(tmpdir): pass") p = pytest_funcarg__tmpdir(FuncargRequest(item)) assert p.check() diff --git a/testing/root/test_py_imports.py b/testing/root/test_py_imports.py index f82b6f488..1f2d56d45 100644 --- a/testing/root/test_py_imports.py +++ b/testing/root/test_py_imports.py @@ -25,17 +25,16 @@ def test_virtual_module_identity(): assert local1 is local2 def test_importall(): - base = py._pydir.join("impl") + base = py._pydir nodirs = [ - base.join('test', 'testing', 'data'), - base.join('path', 'gateway',), - base.join('code', 'oldmagic.py'), - base.join('compat', 'testing'), + base.join('_path', 'gateway',), + base.join('_code', 'oldmagic.py'), + base.join('_compat', 'testing'), ] if sys.version_info >= (3,0): - nodirs.append(base.join('code', '_assertionold.py')) + nodirs.append(base.join('_code', '_assertionold.py')) else: - nodirs.append(base.join('code', '_assertionnew.py')) + nodirs.append(base.join('_code', '_assertionnew.py')) def recurse(p): return p.check(dotfile=0) and p.basename != "attic" @@ -50,7 +49,7 @@ def test_importall(): break else: relpath = relpath.replace(base.sep, '.') - modpath = 'py.impl.%s' % relpath + modpath = 'py.%s' % relpath check_import(modpath) def check_import(modpath): diff --git a/testing/root/test_xmlgen.py b/testing/root/test_xmlgen.py index f21106911..dc076332b 100644 --- a/testing/root/test_xmlgen.py +++ b/testing/root/test_xmlgen.py @@ -1,6 +1,6 @@ import py -from py.impl.xmlgen import unicode, html +from py._xmlgen import unicode, html class ns(py.xml.Namespace): pass diff --git a/testing/test_collect.py b/testing/test_collect.py index e04c9f8ac..6c0aebf12 100644 --- a/testing/test_collect.py +++ b/testing/test_collect.py @@ -2,7 +2,7 @@ import py class TestCollector: def test_collect_versus_item(self): - from py.impl.test.collect import Collector, Item + from py._test.collect import Collector, Item assert not issubclass(Collector, Item) assert not issubclass(Item, Collector) diff --git a/testing/test_compat.py b/testing/test_compat.py index 2c39ef4e1..af0c0fcd6 100644 --- a/testing/test_compat.py +++ b/testing/test_compat.py @@ -1,7 +1,7 @@ from __future__ import generators import py -from py.impl.test.compat import TestCase -from py.impl.test.outcome import Failed +from py._test.compat import TestCase +from py._test.outcome import Failed class TestCompatTestCaseSetupSemantics(TestCase): globlist = [] diff --git a/testing/test_config.py b/testing/test_config.py index 2503613ed..efa6c8bed 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -1,5 +1,5 @@ import py -from py.impl.test.collect import RootCollector +from py._test.collect import RootCollector class TestConfigCmdlineParsing: @@ -75,7 +75,7 @@ class TestConfigAPI: py.test.raises(KeyError, 'config.getvalue("y", o)') def test_config_getvalueorskip(self, testdir): - from py.impl.test.outcome import Skipped + from py._test.outcome import Skipped config = testdir.parseconfig() py.test.raises(Skipped, "config.getvalueorskip('hello')") verbose = config.getvalueorskip("verbose") @@ -182,7 +182,7 @@ class TestConfigApi_getinitialnodes: class TestConfig_gettopdir: def test_gettopdir(self, testdir): - from py.impl.test.config import gettopdir + from py._test.config import gettopdir tmp = testdir.tmpdir assert gettopdir([tmp]) == tmp topdir = gettopdir([tmp.join("hello"), tmp.join("world")]) @@ -191,7 +191,7 @@ class TestConfig_gettopdir: assert gettopdir([somefile]) == tmp def test_gettopdir_pypkg(self, testdir): - from py.impl.test.config import gettopdir + from py._test.config import gettopdir tmp = testdir.tmpdir a = tmp.ensure('a', dir=1) b = tmp.ensure('a', 'b', '__init__.py') diff --git a/testing/test_conftesthandle.py b/testing/test_conftesthandle.py index dc95350df..c1fc7e2ab 100644 --- a/testing/test_conftesthandle.py +++ b/testing/test_conftesthandle.py @@ -1,5 +1,5 @@ import py -from py.impl.test.conftesthandle import Conftest +from py._test.conftesthandle import Conftest def pytest_generate_tests(metafunc): if "basedir" in metafunc.funcargnames: diff --git a/testing/test_deprecated_api.py b/testing/test_deprecated_api.py index 23244c8dc..744c47650 100644 --- a/testing/test_deprecated_api.py +++ b/testing/test_deprecated_api.py @@ -1,6 +1,6 @@ import py -from py.impl.test.outcome import Skipped +from py._test.outcome import Skipped class TestCollectDeprecated: diff --git a/testing/test_funcargs.py b/testing/test_funcargs.py index 4ed1734e7..7b9d61185 100644 --- a/testing/test_funcargs.py +++ b/testing/test_funcargs.py @@ -1,5 +1,5 @@ import py, sys -from py.impl.test import funcargs +from py._test import funcargs def test_getfuncargnames(): def f(): pass diff --git a/testing/test_outcome.py b/testing/test_outcome.py index fd1177fd0..e7dfe761a 100644 --- a/testing/test_outcome.py +++ b/testing/test_outcome.py @@ -31,7 +31,7 @@ def test_exception_printing_skip(): assert s.startswith("Skipped") def test_importorskip(): - from py.impl.test.outcome import Skipped, importorskip + from py._test.outcome import Skipped, importorskip assert importorskip == py.test.importorskip try: sys = importorskip("sys") diff --git a/testing/test_parseopt.py b/testing/test_parseopt.py index a616ca12d..1519caffe 100644 --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -1,5 +1,5 @@ import py -from py.impl.test import parseopt +from py._test import parseopt class TestParser: def test_init(self, capsys): diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index f457ead06..36ce12b47 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -1,6 +1,6 @@ import py, os -from py.impl.test.pluginmanager import PluginManager, canonical_importname -from py.impl.test.pluginmanager import Registry, MultiCall, HookRelay, varnames +from py._test.pluginmanager import PluginManager, canonical_importname +from py._test.pluginmanager import Registry, MultiCall, HookRelay, varnames class TestBootstrapping: @@ -203,7 +203,7 @@ class TestBootstrapping: class TestPytestPluginInteractions: def test_do_option_conftestplugin(self, testdir): - from py.impl.test.config import Config + from py._test.config import Config p = testdir.makepyfile(""" def pytest_addoption(parser): parser.addoption('--test123', action="store_true") @@ -232,7 +232,7 @@ class TestPytestPluginInteractions: ]) def test_do_option_postinitialize(self, testdir): - from py.impl.test.config import Config + from py._test.config import Config config = Config() config.parse([]) config.pluginmanager.do_configure(config=config) diff --git a/testing/test_pycollect.py b/testing/test_pycollect.py index e95ae7e46..0b67384ec 100644 --- a/testing/test_pycollect.py +++ b/testing/test_pycollect.py @@ -444,7 +444,7 @@ def test_modulecol_roundtrip(testdir): class TestTracebackCutting: def test_skip_simple(self): - from py.impl.test.outcome import Skipped + from py._test.outcome import Skipped excinfo = py.test.raises(Skipped, 'py.test.skip("xxx")') assert excinfo.traceback[-1].frame.code.name == "skip" assert excinfo.traceback[-1].ishidden()