From 1318df4f5bc3f8118ed6a173e3d008bad4cb29f4 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Wed, 22 Aug 2012 19:49:50 +0200 Subject: [PATCH] add xfailing test for issue 179 --- testing/test_python.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/testing/test_python.py b/testing/test_python.py index c3cd5dfb1..3e949865e 100644 --- a/testing/test_python.py +++ b/testing/test_python.py @@ -1664,6 +1664,24 @@ class TestFuncargFactory: "*2 passed*" ]) + @pytest.mark.xfail(reason="factorydef passed to tw.line") + def test_factory_uses_unknown_funcarg_error(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.factory(scope='session') + def arg1(missing): + return + + def test_missing(arg1): + pass + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines([ + "*LookupError: no factory found for argument 'missing'" + ]) + + class TestResourceIntegrationFunctional: def test_parametrize_with_ids(self, testdir):