From 28f3261476a1479c9d36a4124dee7eb57f082a8a Mon Sep 17 00:00:00 2001 From: Alessio Bogon Date: Sun, 19 Sep 2021 19:50:08 +0200 Subject: [PATCH] use converters --- tests/feature/test_report.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/feature/test_report.py b/tests/feature/test_report.py index f8e6f8d..f11f8d0 100644 --- a/tests/feature/test_report.py +++ b/tests/feature/test_report.py @@ -297,9 +297,14 @@ def test_complex_types(testdir, pytestconfig): class Alien(object): pass - @given(parsers.parse('there is a coordinate {point}'), target_fixture="point") + @given( + parsers.parse('there is a coordinate {point}'), + target_fixture="point", + converters={"point": Point.parse}, + ) def given_there_is_a_point(point): - return Point.parse(point) + assert isinstance(point, Point) + return point @pytest.mark.parametrize('alien', [Alien()])