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

Mock every usage of is_faker_function to speed up the unit tests #2163

Closed
R-Palazzo opened this issue Aug 2, 2024 · 0 comments · Fixed by #2158
Closed

Mock every usage of is_faker_function to speed up the unit tests #2163

R-Palazzo opened this issue Aug 2, 2024 · 0 comments · Fixed by #2158
Assignees
Labels
internal The issue doesn't change the API or functionality maintenance Tasks related to infrastructure & dependencies
Milestone

Comments

@R-Palazzo
Copy link
Contributor

Problem Description

The initial call of is_faker_function from RDT is consistently slow, taking a few seconds. When running the unit tests, the test that makes this first call always takes longer, causing the unit test to run slowly.

Expected behavior

Running the unit test should take almost no time.
Whenever the is_faker_function method is utilized, tests should mock it with the correct return values, whether used directly or indirectly.

Additional context

To detect which test is doing the first is_faker_function call, one can run:
pytest tests/unit --duration=0
It will be the test that takes more time.

@R-Palazzo R-Palazzo added internal The issue doesn't change the API or functionality maintenance Tasks related to infrastructure & dependencies labels Aug 2, 2024
@R-Palazzo R-Palazzo self-assigned this Aug 2, 2024
@R-Palazzo R-Palazzo added this to the 1.15.1 milestone Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal The issue doesn't change the API or functionality maintenance Tasks related to infrastructure & dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant