Bird
0
0

In your GitHub Actions workflow, the tests step fails with "command not found: pytest" error. What is the most likely cause?

medium📝 Troubleshoot Q7 of 15
Flask - Deployment
In your GitHub Actions workflow, the tests step fails with "command not found: pytest" error. What is the most likely cause?
AThe tests directory is missing
BThe workflow file is named incorrectly
CGitHub Actions does not support pytest
Dpytest is not installed before running tests
Step-by-Step Solution
Solution:
  1. Step 1: Understand error meaning

    "command not found" means pytest is not available in the environment.
  2. Step 2: Identify missing installation step

    pytest must be installed (usually via pip) before running tests.
  3. Final Answer:

    pytest is not installed before running tests -> Option D
  4. Quick Check:

    Missing pytest install causes command not found [OK]
Quick Trick: Always install test tools before running tests [OK]
Common Mistakes:
MISTAKES
  • Assuming tests folder missing causes command error
  • Thinking GitHub Actions blocks pytest
  • Blaming workflow filename for command errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes