Bird
0
0

Which section in pytest.ini is used to register custom markers?

easy🧠 Conceptual Q2 of 15
PyTest - Markers
Which section in pytest.ini is used to register custom markers?
A[markers]
B[pytest]
C[custom_markers]
D[settings]
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct section for markers

    Pytest uses the [markers] section in pytest.ini to list custom markers.
  2. Step 2: Differentiate from other sections

    [pytest] is for general config, [custom_markers] and [settings] are invalid sections for markers.
  3. Final Answer:

    [markers] -> Option A
  4. Quick Check:

    Markers section = [markers] [OK]
Quick Trick: Use [markers] section in pytest.ini to register markers [OK]
Common Mistakes:
MISTAKES
  • Using [pytest] instead of [markers]
  • Creating non-standard sections like [custom_markers]
  • Placing markers outside any section

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PyTest Quizzes