Skip to content

Commit d74dd9c

Browse files
jbrockmendelKevin D Smith
authored and
Kevin D Smith
committed
TST: check_comprehensiveness compat for --lf and -k (pandas-dev#37402)
1 parent 9d425f9 commit d74dd9c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

pandas/tests/indexing/test_coercion.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,21 @@ def has_test(combo):
2929
klass in x.name and dtype in x.name and method in x.name for x in cls_funcs
3030
)
3131

32-
for combo in combos:
33-
if not has_test(combo):
34-
raise AssertionError(f"test method is not defined: {cls.__name__}, {combo}")
32+
opts = request.config.option
33+
if opts.lf or opts.keyword:
34+
# If we are running with "last-failed" or -k foo, we expect to only
35+
# run a subset of tests.
36+
yield
3537

36-
yield
38+
else:
39+
40+
for combo in combos:
41+
if not has_test(combo):
42+
raise AssertionError(
43+
f"test method is not defined: {cls.__name__}, {combo}"
44+
)
45+
46+
yield
3747

3848

3949
class CoercionBase:

0 commit comments

Comments
 (0)