From f4b6a87b2424fabd4ea2d99c291aa906cbab9c63 Mon Sep 17 00:00:00 2001 From: Zac Hatfield-Dodds Date: Wed, 10 Jan 2024 18:18:09 +1100 Subject: [PATCH] fix repr test --- hypothesis-python/tests/cover/test_searchstrategy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hypothesis-python/tests/cover/test_searchstrategy.py b/hypothesis-python/tests/cover/test_searchstrategy.py index b0f49c2520..8c6487b267 100644 --- a/hypothesis-python/tests/cover/test_searchstrategy.py +++ b/hypothesis-python/tests/cover/test_searchstrategy.py @@ -13,6 +13,7 @@ from collections import defaultdict, namedtuple import attr +from hypothesis.internal.reflection import get_pretty_function_description import pytest from hypothesis.errors import InvalidArgument @@ -77,12 +78,12 @@ def f(u, v): def test_can_map_nameless(): f = nameless_const(2) - assert repr(f) in repr(integers().map(f)) + assert get_pretty_function_description(f) in repr(integers().map(f)) def test_can_flatmap_nameless(): f = nameless_const(just(3)) - assert repr(f) in repr(integers().flatmap(f)) + assert get_pretty_function_description(f) in repr(integers().flatmap(f)) def test_flatmap_with_invalid_expand():