Bird
0
0

Which command correctly runs Django tests with coverage collection?

easy📝 Syntax Q12 of 15
Django - Testing Django Applications
Which command correctly runs Django tests with coverage collection?
Acoverage test manage.py run
Bpython manage.py coverage test
Ccoverage run manage.py test
Dmanage.py coverage run test
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct coverage command syntax

    The coverage tool runs the test command with: coverage run manage.py test
  2. Step 2: Compare options

    Only coverage run manage.py test matches the correct syntax; others mix command order incorrectly.
  3. Final Answer:

    coverage run manage.py test -> Option C
  4. Quick Check:

    Correct coverage test command = A [OK]
Quick Trick: Use 'coverage run' before 'manage.py test' [OK]
Common Mistakes:
MISTAKES
  • Swapping command order
  • Using 'coverage test' instead of 'coverage run'
  • Adding 'coverage' after manage.py

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes