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

Test/unit tests pareto optimizer #1109

Open
wants to merge 6 commits into
base: robynpy_release
Choose a base branch
from

Conversation

Marco-Premier
Copy link
Contributor

@Marco-Premier Marco-Premier commented Nov 5, 2024

Project Robyn

Add tests for pareto_optimizer

Test Plan

testresult

test_coverage

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 5, 2024
@dhavalpatel624624
Copy link
Contributor

Can you add the pytest run results? Also are we going to be using the unittest library or pytest? We should standardize the libraries we use across all unit tests. Also, I think this needs a rebase on robynpy_release (you are out of date currently)

Also, are there any common best practices that should be followed here for generating mock data. I feel like there is a lot of redundancy in how the data is mocked for each function

@Marco-Premier
Copy link
Contributor Author

Can you add the pytest run results? Also are we going to be using the unittest library or pytest? We should standardize the libraries we use across all unit tests. Also, I think this needs a rebase on robynpy_release (you are out of date currently)

Also, are there any common best practices that should be followed here for generating mock data. I feel like there is a lot of redundancy in how the data is mocked for each function

Goog points.
I'm happy to use pytest.
I refactor the code to use pytest and to group common mock data setup using pytest fixture.
Also I noticed that in tests where we aim to use pytest we still depend on unittest framework, eg. for patch, MagicMock etc...

We may consider using the pytest-mock instead.
I'd do that on a separate PR

Copy link
Contributor

@dhavalpatel624624 dhavalpatel624624 left a comment

Choose a reason for hiding this comment

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

need to remove pareto_optimizer and response_curve file changes. A rebase should fix it :)

@Marco-Premier Marco-Premier force-pushed the test/unit_tests_pareto_optimizer branch from 8b87442 to dc9201e Compare November 8, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants