From 939a53c4364a6be66ee0c850e12c064bbd49b856 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sun, 3 Oct 2010 11:17:37 +0200 Subject: [PATCH] fix a problem and make a note about pytest_nose calling setup/teardown functions --HG-- branch : trunk --- ISSUES.txt | 3 +++ testing/plugin/test_pytest_python.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ISSUES.txt b/ISSUES.txt index 415ed8b9a..cffd26f80 100644 --- a/ISSUES.txt +++ b/ISSUES.txt @@ -6,6 +6,9 @@ tags: bug 1.4 core xdist * check oejskit plugin compatibility * terminal reporting - dot-printing * some simple profiling +* move pytest_nose out of pylib because it implicitely extends + the protocol now - setup/teardown is called at module level. + consider making calling of setup/teardown configurable refine session initialization / fix custom collect crash --------------------------------------------------------------- diff --git a/testing/plugin/test_pytest_python.py b/testing/plugin/test_pytest_python.py index 4b6d717a0..81d0a0d72 100644 --- a/testing/plugin/test_pytest_python.py +++ b/testing/plugin/test_pytest_python.py @@ -831,12 +831,12 @@ class TestRequestCachedSetup: testdir.makepyfile(test_0=""" l = [] def pytest_funcarg__something(request): - val = request.cached_setup(setup, teardown) + val = request.cached_setup(fsetup, fteardown) return val - def setup(mycache=[1]): + def fsetup(mycache=[1]): l.append(mycache.pop()) return l - def teardown(something): + def fteardown(something): l.remove(something[0]) l.append(2) def test_list_once(something):