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

Refactor test functions with parametrization #554

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

cpaniaguam
Copy link
Collaborator

This pull request refactors the test_likelihoods.py file by adding extra parametrization. The test_no_inf_values_a, test_no_inf_values_t, and test_no_inf_values_v functions are combined into a single test_no_inf_values function. The test_bbox function is also refactored to use parametrization.

Copy link
Collaborator

@AlexanderFengler AlexanderFengler left a comment

Choose a reason for hiding this comment

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

Looks good to merge.

@cpaniaguam cpaniaguam self-assigned this Aug 18, 2024
@cpaniaguam
Copy link
Collaborator Author

@AlexanderFengler It's kind of strange that on my local computer the tests for test_lapse_distribution_cav are not passing.

Any ideas why? Maybe I didn't install things correctly?

=============================================================================================== short test summary info ================================================================================================
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.0-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.0-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.0-blackbox] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.01-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.01-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.01-blackbox] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.05-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.05-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.05-blackbox] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.5-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.5-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.5-blackbox] - KeyError: 'rt,response'
====================================================================================== 12 failed, 7 passed, 14 warnings in 31.57s ======================================================================================

@AlexanderFengler
Copy link
Collaborator

@AlexanderFengler It's kind of strange that on my local computer the tests for test_lapse_distribution_cav are not passing.

Any ideas why? Maybe I didn't install things correctly?

=============================================================================================== short test summary info ================================================================================================
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.0-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.0-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.0-blackbox] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.01-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.01-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.01-blackbox] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.05-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.05-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.05-blackbox] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.5-analytical] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.5-approx_differentiable] - KeyError: 'rt,response'
FAILED tests/test_likelihoods.py::test_lapse_distribution_cav[0.5-blackbox] - KeyError: 'rt,response'
====================================================================================== 12 failed, 7 passed, 14 warnings in 31.57s ======================================================================================

@cpaniaguam no idea actually. I will check on my end and report back.

What's process did you follow for install?

@AlexanderFengler
Copy link
Collaborator

@cpaniaguam I think the branch was behind main and some bug-fixes happened in the meanwhile.
There was a larger refactor that happened, and it created a number (however shallow) bugs.
I got errors initially, but all good after merging in newest main.

@AlexanderFengler AlexanderFengler merged commit ef4e4ed into main Aug 20, 2024
2 checks passed
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