diff options
author | Anthony Sottile <asottile@umich.edu> | 2018-11-22 10:05:10 -0800 |
---|---|---|
committer | Anthony Sottile <asottile@umich.edu> | 2018-11-29 09:34:51 -0800 |
commit | 1bba0a97146575b496ac3a021f6a68e1be74ec0d (patch) | |
tree | 32800189014974b94885d954041ba17a3ff81d2e /testing/test_pluginmanager.py | |
parent | 5cf69fae7d184da469afd539a7b8ddd1219d9d8e (diff) | |
download | pytest-1bba0a97146575b496ac3a021f6a68e1be74ec0d.tar.gz |
Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)')
Diffstat (limited to 'testing/test_pluginmanager.py')
-rw-r--r-- | testing/test_pluginmanager.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index 64d05d383..6137b2771 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -196,7 +196,7 @@ class TestPytestPluginManager(object): assert pm.is_registered(mod) values = pm.get_plugins() assert mod in values - pytest.raises(ValueError, "pm.register(mod)") + pytest.raises(ValueError, pm.register, mod) pytest.raises(ValueError, lambda: pm.register(mod)) # assert not pm.is_registered(mod2) assert pm.get_plugins() == values @@ -284,8 +284,8 @@ class TestPytestPluginManager(object): result.stdout.fnmatch_lines(["*1 passed*"]) def test_import_plugin_importname(self, testdir, pytestpm): - pytest.raises(ImportError, 'pytestpm.import_plugin("qweqwex.y")') - pytest.raises(ImportError, 'pytestpm.import_plugin("pytest_qweqwx.y")') + pytest.raises(ImportError, pytestpm.import_plugin, "qweqwex.y") + pytest.raises(ImportError, pytestpm.import_plugin, "pytest_qweqwx.y") testdir.syspathinsert() pluginname = "pytest_hello" @@ -301,8 +301,8 @@ class TestPytestPluginManager(object): assert plugin2 is plugin1 def test_import_plugin_dotted_name(self, testdir, pytestpm): - pytest.raises(ImportError, 'pytestpm.import_plugin("qweqwex.y")') - pytest.raises(ImportError, 'pytestpm.import_plugin("pytest_qweqwex.y")') + pytest.raises(ImportError, pytestpm.import_plugin, "qweqwex.y") + pytest.raises(ImportError, pytestpm.import_plugin, "pytest_qweqwex.y") testdir.syspathinsert() testdir.mkpydir("pkg").join("plug.py").write("x=3") |