Skip to content

Commit 85b1a07

Browse files
author
Sylvain MARIE
committed
Fixed checker for class
1 parent ff2e9fd commit 85b1a07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pytest_cases/fixture_parametrize_plus.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from .common_pytest import get_fixture_name, remove_duplicates, mini_idvalset, is_marked_parameter_value, \
3333
extract_parameterset_info, ParameterSet, cart_product_pytest, mini_idval, inject_host, \
3434
get_marked_parameter_values, resolve_ids, get_marked_parameter_id, get_marked_parameter_marks, is_fixture, \
35-
safe_isinstance
35+
safe_isclass
3636

3737
from .fixture__creation import check_name_available, CHANGE, WARN
3838
from .fixture_core1_unions import InvalidParamsList, NOT_USED, UnionFixtureAlternative, _make_fixture_union, \
@@ -789,7 +789,7 @@ def _make_ids(**args):
789789
else:
790790
# wrap the decorator to check if the test function has the parameters as arguments
791791
def _apply(test_func):
792-
if not safe_isinstance(test_func, type):
792+
if not safe_isclass(test_func):
793793
# a Function: raise a proper error message if improper use
794794
s = signature(test_func)
795795
for p in argnames:
@@ -932,7 +932,7 @@ def parametrize_plus_decorate(test_func, fixtures_dest):
932932
test_func_name = test_func.__name__
933933

934934
# first check if the test function has the parameters as arguments
935-
if safe_isinstance(test_func, type):
935+
if safe_isclass(test_func):
936936
# a test class: not supported yet
937937
raise NotImplementedError("@parametrize can not be used to decorate a Test class when the argvalues "
938938
"contain at least one reference to a fixture.")

0 commit comments

Comments
 (0)