move down py/impl/XYZ to py/_XYZ

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-01-13 17:15:54 +01:00
parent 5c27076d32
commit 9da1ba40ed
132 changed files with 229 additions and 231 deletions

View File

@@ -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":

View File

@@ -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:

View File

@@ -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')")

View File

@@ -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()

View File

@@ -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

View File

@@ -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__

View File

@@ -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):

View File

@@ -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:

View File

@@ -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")

View File

@@ -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

View File

@@ -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__="")

View File

@@ -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()

View File

@@ -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():

View File

@@ -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'

View File

@@ -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)

View File

@@ -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()