Bird
0
0

Which command runs pytest and shows a detailed summary of each test including passed, failed, and skipped tests?

easy🧠 Conceptual Q2 of 15
PyTest - Basics and Setup
Which command runs pytest and shows a detailed summary of each test including passed, failed, and skipped tests?
Apytest -v
Bpytest --quiet
Cpytest --maxfail=1
Dpytest --disable-warnings
Step-by-Step Solution
Solution:
  1. Step 1: Identify the option for detailed output

    The -v or --verbose flag tells pytest to show detailed info about each test.
  2. Step 2: Understand other options

    --quiet reduces output, --maxfail=1 stops after first failure, and --disable-warnings hides warnings.
  3. Final Answer:

    pytest -v -> Option A
  4. Quick Check:

    pytest verbose flag = -v [OK]
Quick Trick: Use -v for verbose test output in pytest [OK]
Common Mistakes:
MISTAKES
  • Confusing --quiet with verbose output
  • Using --maxfail=1 expecting detailed summary
  • Thinking --disable-warnings shows test details

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PyTest Quizzes