Skip to content

@pytest.mark.unvectorized breaks when a test function is a part of a TestClass #415

@ev-br

Description

@ev-br

case in point: combine test_expand_dims and test_expand_dims_tuples into a test class: pytest complains

INTERNALERROR>   File "/home/br/miniforge3/envs/scipy-dev/lib/python3.12/site-packages/hypothesis/_settings.py", line 929, in __call__
INTERNALERROR>     _test._hypothesis_internal_use_settings = self
INTERNALERROR>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> AttributeError: 'method' object has no attribute '_hypothesis_internal_use_settings'

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /home/br/miniforge3/envs/scipy-dev/lib/python3.12/site-packages/hypothesis/_settings.py(929)__call__()
-> _test._hypothesis_internal_use_settings = self

and the error is gone if I remove @pytest.mark.unvectorized decorator from test_expand_dims

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions