Does anyone have a shortcut for running `./pants t...
# general
n
Does anyone have a shortcut for running
./pants test
but just the tests in & under the current working directory?
c
Hi Rhys. Yes, try
./pants test path/to/test::
Uhm, you want to run pants from your project root, so current working directory, not so much.
n
Thanks, just got the wildcard working, but with deeply nested folder it's a bit of a pain. I guess I could write an
npm run
script to handle it (since we have that at root), but curious what others do.
h
I've never tried to run Pants from any directory other than the repo root, does that work for you?
n
I guess i'm in the habit of running
pytest
from the cwd, trying to get in the habit of running pants directly.
c
I use it along with
--loop
, that way, you don’t have to type it that much…
Copy code
./pants --loop test src/potentially/long/path/to/test::
So, you leave that there, and whenever you make a change, the tests re-run.
👍 1