Skip to main content
Simplifying the answer
Source Link
Gerry C
  • 576
  • 6
  • 6

Try:

pytest path/file_test.py::test_name

Using -k as others have suggested will match any test with that substring, which is rarely what I wantnot just a specific test.

Try:

pytest path/file_test.py::test_name

Using -k will match any test with that substring, which is rarely what I want.

Try:

pytest path/file_test.py::test_name

Using -k as others have suggested will match any test with that substring, not just a specific test.

added 6 characters in body
Source Link
Gerry C
  • 576
  • 6
  • 6

Try:

pytest path/file_test.py::test_name

Using -k will match any test with that substring, which is rarely what I want.

pytest path/file_test.py::test_name

Using -k will match any test with that substring, which is rarely what I want.

Try:

pytest path/file_test.py::test_name

Using -k will match any test with that substring, which is rarely what I want.

Source Link
Gerry C
  • 576
  • 6
  • 6

pytest path/file_test.py::test_name

Using -k will match any test with that substring, which is rarely what I want.