Bird
0
0

Which of the following is the recommended prefix for pytest test files?

easy🧠 Conceptual Q1 of 15
PyTest - Basics and Setup
Which of the following is the recommended prefix for pytest test files?
Averify_
Bcheck_
Ctest_
Drun_
Step-by-Step Solution
Solution:
  1. Step 1: Understand pytest file naming rules

    Pytest looks for files starting with test_ or ending with _test.py.
  2. Step 2: Identify the correct prefix

    Among the options, only test_ is the standard prefix recognized by pytest.
  3. Final Answer:

    test_ -> Option C
  4. Quick Check:

    Test file prefix = test_ [OK]
Quick Trick: Test files start with 'test_' prefix for pytest discovery [OK]
Common Mistakes:
MISTAKES
  • Using prefixes like 'check_' or 'run_' which pytest ignores
  • Naming files without 'test_' prefix or suffix
  • Using uppercase letters in file names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PyTest Quizzes