.skills/run-python-tests/SKILL.md
Run end-to-end Python tests after making changes to verify correctness.
<filename>: Run all Python tests in the specified file<filename>:<test_name>: Run a specific Python test in the specified file<filename 1> <filename 2>: Run all Python tests in the specified filesArguments provided: $ARGUMENTS
Some tests take longer to run than others. The TEST_TIMEOUT parameter controls how long each test is allowed to run before being terminated.
TEST_TIMEOUT=20 to get fast feedback. Tests that exceed this timeout will be terminated.TEST_TIMEOUT to let tests run with the default timeout (300 seconds).Always start with a quick verification, using TEST_TIMEOUT=20. Faster feedback loops lead to faster iteration.
If there are timeouts during a quick verification run, check if the timed-out tests are relevant to the current task:
./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20
./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20 TEST="<filename without extension>"
For example:
./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20 TEST="test_crash"
for running tests from tests/pytests/test_crash.py.
./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20 TEST="<filename 1> <filename 2>"
For example:
./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20 TEST="test_crash test_gc"
for running tests from tests/pytests/test_crash.py and tests/pytests/test_gc.py.
./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20 TEST="<filename without extension>:<test_name>"
For example:
./build.sh RUN_PYTEST ENABLE_ASSERT=1 TEST_TIMEOUT=20 TEST="test_crash:test_query_thread_crash"
for running the test_query_thread_crash test from tests/pytests/test_crash.py.
For each failed test, you'll see an error message with details about the failure, as seen from the Python test runner.
Each failed test will also have an associated log file, located under tests/pytests/logs. The name of the log file
changes with every test run, but it's included in the output of the test runner.
After running the tests, put together a report:
# search_rust_backtrace section)