catherio / pytest-catherio

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
https://pytest.org
MIT License
0 stars 0 forks source link

-k doesn't work with regexes #11

Open catherio opened 2 hours ago

catherio commented 2 hours ago

I want to run a selective number of tests, so -k should take in a regexp string

github-actions[bot] commented 2 hours ago

To help investigate this issue, please provide a minimal reproducible example. Here's what that could look like:

# test_example.py
def test_abc():
    assert True

def test_def():
    assert True

Then show:

  1. The exact command you ran (e.g., pytest -k "test_a.*")
  2. What output you expected
  3. What output you actually got

For example:

$ pytest -k "test_a.*" test_example.py
# Expected: test_abc runs, test_def is skipped
# Actually got: [your actual result here]

This will help us understand and reproduce the issue you're experiencing with regex patterns in the -k flag.