How much of a lift would it be to use a different ...
# general
a
How much of a lift would it be to use a different test runner (for Python)? Reading plugin docs right now
h
It would be some work, but not conceptually hard
Depending on what exactly you want to happen
do you want
pants test
to run this other test runner everywhere it would normally run
pytest
? Or do they both need to work concurrently (presumably on different targets)?
a
It's Nose, and fortunately it can be on all targets until we eventually move to Pytest. Yes having
pants test
invoking nose would be ideal
h
One relatively straightforward way to do this would be to have a new
nose_tests
target that pytest naturally ignores, and a new nose rule would act on. Then transitioning a test from one to the other would just be a matter of changing the target type.
a
Thanks, I'll look into this 👍
So I've followed https://www.pantsbuild.org/2.19/docs/writing-plugins/common-plugin-tasks/run-tests alongside with https://www.pantsbuild.org/2.19/docs/writing-plugins/the-rules-api/processes, https://www.pantsbuild.org/2.19/docs/writing-plugins/the-rules-api/installing-tools#pex-install-binaries-through-pip, https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/goals/pytest_runner.py, and https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/subsystems/pytest.py for reference, and this is what I've come up with. I'm now stuck on the following error message:
Copy code
23:35:41.79 [INFO] Initializing scheduler...
23:35:43.86 [INFO] Scheduler initialized.
23:35:43.94 [WARN] No applicable files or targets matched. The `test` goal works with these target types:

  * python_test

However, you only specified file arguments with these target types:

  * nose_test

Please specify relevant file and/or target arguments. Run `pants --filter-target-type=python_test list ::` to find all applicable targets in your project, or run `pants --filter-target-type=python_test filedeps ::` to find all applicable files.
On a successive invocation following immediately after the one that causes the above, I get no output and a
0
exit code. For context I'm running on NixOS and am constructing an FHS-compliant user environment to allow the python-build-standalone binaries to run. Any ideas on how to debug?