summaryrefslogtreecommitdiff
path: root/testing/test_monkeypatch.py
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2016-07-11 22:03:53 -0300
committerBruno Oliveira <nicoddemus@gmail.com>2016-07-11 22:21:52 -0300
commit458ecae1df0ede57182db685e7b9b3b8f0c7a652 (patch)
tree4bd7050c5d1be2bdb2d76d4f9f20667667703ba2 /testing/test_monkeypatch.py
parentad4125dc0d0c941f50ae42aa61663a3895a6fd9f (diff)
downloadpytest-458ecae1df0ede57182db685e7b9b3b8f0c7a652.tar.gz
Replace all usages of "pytest_funcarg__" for @pytest.fixture
Diffstat (limited to 'testing/test_monkeypatch.py')
-rw-r--r--testing/test_monkeypatch.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/testing/test_monkeypatch.py b/testing/test_monkeypatch.py
index 048c942c8..7599be47f 100644
--- a/testing/test_monkeypatch.py
+++ b/testing/test_monkeypatch.py
@@ -3,10 +3,11 @@ import sys
import textwrap
import pytest
-from _pytest.monkeypatch import monkeypatch as MonkeyPatch
+from _pytest.monkeypatch import MonkeyPatch
-def pytest_funcarg__mp(request):
+@pytest.fixture
+def mp(request):
cwd = os.getcwd()
sys_path = list(sys.path)
@@ -205,7 +206,7 @@ def test_setenv_prepend():
def test_monkeypatch_plugin(testdir):
reprec = testdir.inline_runsource("""
def test_method(monkeypatch):
- assert monkeypatch.__class__.__name__ == "monkeypatch"
+ assert monkeypatch.__class__.__name__ == "MonkeyPatch"
""")
res = reprec.countoutcomes()
assert tuple(res) == (1, 0, 0), res