avoid undocumented special casing of "pytest_" prefix
--HG-- branch : plugin_no_pytest
This commit is contained in:
parent
20d6c0b560
commit
894d7dca22
|
@ -208,8 +208,6 @@ class PytestPluginManager(PluginManager):
|
|||
try:
|
||||
mod = importplugin(modname)
|
||||
except ImportError:
|
||||
if modname.startswith("pytest_"):
|
||||
return self.import_plugin(modname[7:])
|
||||
raise
|
||||
except Exception as e:
|
||||
import pytest
|
||||
|
|
|
@ -64,7 +64,7 @@ def test_parseconfig(testdir):
|
|||
|
||||
def test_testdir_runs_with_plugin(testdir):
|
||||
testdir.makepyfile("""
|
||||
pytest_plugins = "pytest_pytester"
|
||||
pytest_plugins = "pytester"
|
||||
def test_hello(testdir):
|
||||
assert 1
|
||||
""")
|
||||
|
|
|
@ -22,7 +22,6 @@ def test_WarningRecorder(recwarn):
|
|||
|
||||
def test_recwarn_functional(testdir):
|
||||
reprec = testdir.inline_runsource("""
|
||||
pytest_plugins = 'pytest_recwarn',
|
||||
import warnings
|
||||
oldwarn = warnings.showwarning
|
||||
def test_method(recwarn):
|
||||
|
|
|
@ -3,7 +3,6 @@ import pytest
|
|||
def test_simple_unittest(testdir):
|
||||
testpath = testdir.makepyfile("""
|
||||
import unittest
|
||||
pytest_plugins = "pytest_unittest"
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def testpassing(self):
|
||||
self.assertEquals('foo', 'foo')
|
||||
|
@ -17,7 +16,6 @@ def test_simple_unittest(testdir):
|
|||
def test_runTest_method(testdir):
|
||||
testdir.makepyfile("""
|
||||
import unittest
|
||||
pytest_plugins = "pytest_unittest"
|
||||
class MyTestCaseWithRunTest(unittest.TestCase):
|
||||
def runTest(self):
|
||||
self.assertEquals('foo', 'foo')
|
||||
|
|
Loading…
Reference in New Issue