Hey! These docs are for version 2.0, which is no longer officially supported. Click here for the latest version, 2.7!
./pants test [args]

Run tests.

Config section: [test]

Basic options

--[no-]test-debug
PANTS_TEST_DEBUG
debug
default: False
Run tests sequentially in an interactive process. This is necessary, for example, when you add breakpoints to your code.

--[no-]test-force
PANTS_TEST_FORCE
force
default: False
Force the tests to run, even if they could be satisfied from cache.

--test-output=<ShowOutput>
PANTS_TEST_OUTPUT
output
one of: all, failed, none
default: failed
Show stdout/stderr for these tests.

--[no-]test-use-coverage
PANTS_TEST_USE_COVERAGE
use_coverage
default: False
Generate a coverage report if the test runner supports it.

--[no-]test-open-coverage
PANTS_TEST_OPEN_COVERAGE
open_coverage
default: False
If a coverage report file is generated, open it on the local system if the system supports this.

--test-extra-env-vars="['<str>', '<str>', ...]"
PANTS_TEST_EXTRA_ENV_VARS
extra_env_vars
default: []
Additional environment variables to include in test processes. Entries are strings in the form `ENV_VAR=value` to use explicitly; or just `ENV_VAR` to copy the value of a variable in Pants's own environment.

Advanced options

None

Deprecated options

None

Related subsystems

coverage-py, download-pex-bin, grpc_python_plugin, lambdex, pex, pex-binary-defaults, protoc, pytest, python-infer, python-native-code, python-protobuf, python-repos, python-setup, setup-py-generation, setuptools, source, subprocess-environment, test


Did this page help you?