avoid undocumented special casing of "pytest_" prefix

--HG--
branch : plugin_no_pytest
This commit is contained in:
holger krekel 2015-04-22 13:44:37 +02:00
parent 20d6c0b560
commit 894d7dca22
4 changed files with 1 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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