0
0
PyTesttesting~10 mins

Command-line options in PyTest - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run pytest with verbose output.

PyTest
pytest [1]
Drag options to blanks, or click blank then click option'
A-v
B-q
C--maxfail=1
D--disable-warnings
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-q' which makes output quieter instead of verbose.
Using '--maxfail=1' which stops after one failure, not verbose output.
2fill in blank
medium

Complete the command to stop pytest after the first failure.

PyTest
pytest [1]
Drag options to blanks, or click blank then click option'
A--maxfail=1
B-v
C-q
D--disable-warnings
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-v' which only changes verbosity.
Using '-q' which quiets output but does not stop on failure.
3fill in blank
hard

Fix the error in the command to disable warnings during pytest run.

PyTest
pytest [1]
Drag options to blanks, or click blank then click option'
A-dw
B-w
C--disable-warnings
D--no-warnings
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-w' which is not a valid pytest option.
Using '--no-warnings' which does not exist.
4fill in blank
hard

Fill both blanks to run pytest quietly and stop after 2 failures.

PyTest
pytest [1] [2]
Drag options to blanks, or click blank then click option'
A-q
B-v
C--maxfail=2
D--disable-warnings
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-v' instead of '-q' for quiet mode.
Using '--maxfail=1' instead of 2.
5fill in blank
hard

Fill all three blanks to run pytest with verbose output, stop after 3 failures, and disable warnings.

PyTest
pytest [1] [2] [3]
Drag options to blanks, or click blank then click option'
A-v
B--maxfail=3
C--disable-warnings
D-q
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-q' instead of '-v' for verbosity.
Using wrong maxfail number.
Omitting the disable warnings option.