Bird
0
0

You want to run all tests except those marked slow. Which pytest command should you use?

hard📝 framework Q15 of 15
Selenium Python - Test Framework Integration (pytest)
You want to run all tests except those marked slow. Which pytest command should you use?
Apytest -m slow
Bpytest --exclude slow
Cpytest --skip slow
Dpytest -m "not slow"
Step-by-Step Solution
Solution:
  1. Step 1: Understand pytest marker expressions

    To exclude tests with a marker, use -m "not marker_name" syntax.
  2. Step 2: Match command to requirement

    pytest -m "not slow" uses "not slow" to run all tests except those marked slow.
  3. Final Answer:

    pytest -m "not slow" -> Option D
  4. Quick Check:

    Use -m "not marker" to exclude tests [OK]
Quick Trick: Use -m "not marker" to skip marked tests [OK]
Common Mistakes:
  • Using -m marker to run only those tests
  • Using unsupported --skip or --exclude options
  • Not quoting the expression with spaces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes