Overview - Command-line options
What is it?
Command-line options in pytest are special flags or arguments you add when running tests from the terminal. They change how pytest behaves, like selecting which tests to run, showing more details, or stopping early. These options help customize test runs without changing the test code itself.
Why it matters
Without command-line options, running tests would be rigid and slow. You couldn't easily pick specific tests or get detailed info when something fails. This would waste time and make debugging harder. Command-line options let you work smarter by controlling test runs to fit your needs.
Where it fits
Before learning command-line options, you should know how to write basic pytest tests and run them simply. After mastering options, you can explore pytest plugins and advanced configuration files to automate and extend testing.