Skip to main content
edited body
Source Link
Peter
  • 1.4k
  • 3
  • 16
  • 16

If you have the same method name in two different classes and you just want to run one of them, this works:

pytest tests.py -k 'TestClassName"TestClassName and test_method_name'test_method_name"

If you have the same method name in two different classes and you just want to run one of them, this works:

pytest tests.py -k 'TestClassName and test_method_name'

If you have the same method name in two different classes and you just want to run one of them, this works:

pytest tests.py -k "TestClassName and test_method_name"
Source Link
Peter
  • 1.4k
  • 3
  • 16
  • 16

If you have the same method name in two different classes and you just want to run one of them, this works:

pytest tests.py -k 'TestClassName and test_method_name'