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

TST: improve parametrization style #88

Merged
merged 1 commit into from
Feb 1, 2025
Merged

Conversation

mdhaber
Copy link
Owner

@mdhaber mdhaber commented Feb 1, 2025

Improves pytest output and make progress toward benchmarking by ensuring that lambdas have string names associated with them.

Now, the pytest output shows, e.g.

test_marray.py::test_arithmetic_unary[numpy-uint8-+x-<lambda>] 
test_marray.py::test_arithmetic_unary[numpy-uint8--x-<lambda>] 
test_marray.py::test_arithmetic_unary[numpy-uint8-abs-abs] 
test_marray.py::test_arithmetic_unary[numpy-uint8-x.__abs__-<lambda>] 
test_marray.py::test_arithmetic_unary[numpy-uint8-x.__neg__-<lambda>] 
test_marray.py::test_arithmetic_unary[numpy-uint8-x.__pos__-<lambda>] 

whereas before it was like:

test_marray.py::test_arithmetic_unary[numpy-uint8-<lambda>0] 
test_marray.py::test_arithmetic_unary[numpy-uint8-<lambda>1] 
test_marray.py::test_arithmetic_unary[numpy-uint8-<lambda>2] 
test_marray.py::test_arithmetic_unary[numpy-uint8-<lambda>3] 

Copy link
Collaborator

@lucascolley lucascolley left a comment

Choose a reason for hiding this comment

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

nice!

@lucascolley lucascolley merged commit 4b9abaf into main Feb 1, 2025
11 checks passed
@lucascolley lucascolley deleted the parametrize_improve branch February 1, 2025 21:33
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