Opened 79 minutes ago
#37303 new New feature
Specify which test modules are being run in runtests.py
| Reported by: | AJ Collins | Owned by: | |
|---|---|---|---|
| Component: | Testing framework | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | AJ Collins | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
I'm new to the project and was reviewing tests on a PR (this one if that helps). I ran ./tests/runtests.py admin_scripts and thought it was running all the project's tests since it said "Found 238 test(s)". I naively thought 238 was too many tests for admin_scripts, and the output made no mention of "admin_scripts". I spent 5-10 minutes trying to see what I was doing wrong, since I was expecting the initial output to say *which* module was being run.
I'd like to propose that runtests.py specify the test module(s) being run *only when a subset is being run*. Proposed options below with changes surrounded in asterisks:
Option 1: List all modules being run. Potentially over-verbose when going beyond 10 modules...
> ./tests/runtests.py admin_scripts Testing against Django installed in '/home/ajc/django' with up to 10 processes Found 800 test(s). **Running tests in: admin_scripts, admin_views**.
Option 2: specify the number of modules being run:
> ./tests/runtests.py admin_scripts Testing against Django installed in '/home/ajc/django' with up to 10 processes Found 800 test(s) **across 2 module(s)**.
I'm mainly just hoping for some initial feedback from the test script indicating that I properly selected the subset of tests