|
32 | 32 | from .common_pytest import get_fixture_name, remove_duplicates, mini_idvalset, is_marked_parameter_value, \ |
33 | 33 | extract_parameterset_info, ParameterSet, cart_product_pytest, mini_idval, inject_host, \ |
34 | 34 | get_marked_parameter_values, resolve_ids, get_marked_parameter_id, get_marked_parameter_marks, is_fixture, \ |
35 | | - safe_isinstance |
| 35 | + safe_isclass |
36 | 36 |
|
37 | 37 | from .fixture__creation import check_name_available, CHANGE, WARN |
38 | 38 | from .fixture_core1_unions import InvalidParamsList, NOT_USED, UnionFixtureAlternative, _make_fixture_union, \ |
@@ -789,7 +789,7 @@ def _make_ids(**args): |
789 | 789 | else: |
790 | 790 | # wrap the decorator to check if the test function has the parameters as arguments |
791 | 791 | def _apply(test_func): |
792 | | - if not safe_isinstance(test_func, type): |
| 792 | + if not safe_isclass(test_func): |
793 | 793 | # a Function: raise a proper error message if improper use |
794 | 794 | s = signature(test_func) |
795 | 795 | for p in argnames: |
@@ -932,7 +932,7 @@ def parametrize_plus_decorate(test_func, fixtures_dest): |
932 | 932 | test_func_name = test_func.__name__ |
933 | 933 |
|
934 | 934 | # first check if the test function has the parameters as arguments |
935 | | - if safe_isinstance(test_func, type): |
| 935 | + if safe_isclass(test_func): |
936 | 936 | # a test class: not supported yet |
937 | 937 | raise NotImplementedError("@parametrize can not be used to decorate a Test class when the argvalues " |
938 | 938 | "contain at least one reference to a fixture.") |
|
0 commit comments