Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform require_numba decorator into a global variable #245

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Sep 8, 2021

The require_numba as a function wrapper makes it hard to use
pytest.mark.parametrize on test functions. Following pytest
documentation, it's better to define custom decorators as global
variables.

Source: https://docs.pytest.org/en/6.2.x/skipping.html#id1

The require_numba as a function wrappers makes it hard to use
pytest.mark.parametrize on test functions. Following pytest
documentation, it's better to define custom decorators as global
variables.
@santisoler santisoler changed the title Transform require_numba decorator into a variable Transform require_numba decorator into a global variable Sep 8, 2021
Copy link
Member

@leouieda leouieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽 good to know how to do this properly! Should have read the docs before making the decorator wrapper 😆

@santisoler
Copy link
Member Author

👍🏽 good to know how to do this properly! Should have read the docs before making the decorator wrapper laughing

Haha, back when I did this I think I was just trying to hack it because of my ignorance. Good to know there are docs out there 😬

@santisoler santisoler merged commit d4222ef into master Sep 13, 2021
@santisoler santisoler deleted the require_numba branch September 13, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants