Skip to content

Commit

Permalink
Fixed checker for class
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain MARIE committed Jun 3, 2021
1 parent ff2e9fd commit 85b1a07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytest_cases/fixture_parametrize_plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from .common_pytest import get_fixture_name, remove_duplicates, mini_idvalset, is_marked_parameter_value, \
extract_parameterset_info, ParameterSet, cart_product_pytest, mini_idval, inject_host, \
get_marked_parameter_values, resolve_ids, get_marked_parameter_id, get_marked_parameter_marks, is_fixture, \
safe_isinstance
safe_isclass

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

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

0 comments on commit 85b1a07

Please sign in to comment.