10000 Trying Thomas' suggestion · NicolasHug/scikit-learn@f54bf8c · GitHub
[go: up one dir, main page]

Skip to content

Commit f54bf8c

Browse files
committed
Trying Thomas' suggestion
1 parent bfa4f16 commit f54bf8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/utils/estimator_checks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def _yield_all_checks(name, estimator):
290290
yield check_fit_non_negative
291291

292292

293-
def _set_check_estimator_ids(obj):
293+
def _set_check_estimator_ids(obj, include_keywords=True):
294294
"""Create pytest ids for checks.
295295
296296
When `obj` is an estimator, this returns the pprint version of the
@@ -318,7 +318,7 @@ def _set_check_estimator_ids(obj):
318318
if not isinstance(obj, partial):
319319
return obj.__name__
320320

321-
if not obj.keywords:
321+
if not obj.keywords or not include_keywords:
322322
return obj.func.__name__
323323

324324
kwstring = ",".join(["{}={}".format(k, v)
@@ -378,7 +378,7 @@ def _mark_xfail_checks(estimator, check, pytest):
378378
if not xfail_checks:
379379
return estimator, check
380380

381-
check_name = _set_check_estimator_ids(check)
381+
check_name = _set_check_estimator_ids(check, include_keywords=False)
382382
msg = xfail_checks.get(check_name, None)
383383

384384
if msg is None:

0 commit comments

Comments
 (0)
0