brave-toddler-94793
07/08/2022, 10:57 AMpytest
you can use markers to run tests selectively. So maybe you want to 1st run all unit tests (quick, no services, etc). Then run tests that require a database and some local services. Then run tests that require external services/APIs. The idea being to not waste time testing some API client if some unit test will fail after it.
The "normal" way is to use markers and run pytest one time for each. Another way is to sort all tests (across all modules) to run unit first, integration after.
But I cannot see a way to leverage this in Pants (without messing around with environment variables). What is the "pants way" to run unit & integrations tests in separate goals?brave-toddler-94793
07/08/2022, 10:58 AMnarrow-vegetable-37489
07/08/2022, 11:01 AM./pants test :: -- -m integration_test
.bitter-ability-32190
07/08/2022, 11:06 AMbrave-toddler-94793
07/08/2022, 11:11 AMhappy-kitchen-89482
07/11/2022, 6:24 PMhappy-kitchen-89482
07/11/2022, 6:24 PMhappy-kitchen-89482
07/11/2022, 6:26 PM