move down py/impl/XYZ to py/_XYZ
--HG-- branch : trunk
This commit is contained in:
@@ -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":
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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')")
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__="")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user