Bird
0
0

What does the basic pytest command do when run in a project folder?

easy🧠 Conceptual Q11 of 15
PyTest - Basics and Setup
What does the basic pytest command do when run in a project folder?
AIt only checks the syntax of test files without running them.
BIt automatically finds and runs all test files and test functions.
CIt deletes all test files in the folder.
DIt installs pytest in the project folder.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the default behavior of pytest command

    Running pytest without arguments searches for test files and runs all tests found.
  2. Step 2: Eliminate incorrect options

    Options A, C, and D describe actions pytest does not perform by default.
  3. Final Answer:

    It automatically finds and runs all test files and test functions. -> Option B
  4. Quick Check:

    pytest runs tests automatically = B [OK]
Quick Trick: pytest runs all tests by default when no file is specified [OK]
Common Mistakes:
MISTAKES
  • Thinking pytest only checks syntax
  • Assuming pytest deletes files
  • Confusing pytest with package installer

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PyTest Quizzes