You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pytest_discover_tests cmake function does not automatically update new tests if new tests are implemented.
In the build directory if not cleaned every time.
Possible workaround to explicitly list the python sources as dependencies under pytest_discover_tests function.
pytest_discover_tests(
PythonTest
DEPENDS <list of python testfiles>
)
The text was updated successfully, but these errors were encountered:
I'm a bit reluctant to rely on DEPENDS for this, as it is already used for dependent libraries. That said, it does get the job done, and I agree that manually cleaning the build directory each time is quite cumbersome. I'll have a look at it over the weekend!
I considered reusing the pytest --collect-only command to deduce dependent Python test files for the target, but I feel this approach would add unnecessary complexity to the script and increase the potential for errors. It could also negatively impact configuration performance, especially when collecting tests from a large directory structure.
So, I reverted to your suggestion of simply documenting using DEPENDS to ensure that the target is rebuilding whenever a Python test is changed (#52)
When developing tests using pytest.
The
pytest_discover_tests
cmake function does not automatically update new tests if new tests are implemented.In the build directory if not cleaned every time.
Possible workaround to explicitly list the python sources as dependencies under
pytest_discover_tests
function.The text was updated successfully, but these errors were encountered: