Mock every usage of is_faker_function
to speed up the unit tests
#2163
Labels
internal
The issue doesn't change the API or functionality
maintenance
Tasks related to infrastructure & dependencies
Milestone
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.
The text was updated successfully, but these errors were encountered: