[pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Christoph Buelter
Greetings, the -k EXPRESSION matching behaviour of the pytest CLI, which deselects tests based on the given expression, is case-sensitive. The relevant code of the KeywordMapping is just a few lines: https://github.com/pytest-dev/pytest/blob/master/src/_pytest/mark/legacy.py#L59-L63 That means u

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Bruno Oliveira
Hi Christoph, On Wed, Dec 4, 2019 at 9:38 AM Christoph Buelter < buelter.christ...@gmail.com> wrote: > Greetings, > > the -k EXPRESSION matching behaviour of the pytest CLI, which deselects > tests based on the given expression, is case-sensitive. > More than once I've myself wished that it woul

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Florian Bruhin
Hey, On Wed, Dec 04, 2019 at 10:58:09AM -0300, Bruno Oliveira wrote: > I would actually vote to change the existing behavior to be > case-insensitive. I doubt it would break many suites, if at all, and would > be more in alignment with the intent of the option, more of it being a > "partial match"

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Brian Okken
I think switching to case insensitive by default would be fine. Do we need a flag for case sensitive? Not sure. - Brian > On Dec 4, 2019, at 6:26 AM, Florian Bruhin wrote: > > Hey, > >> On Wed, Dec 04, 2019 at 10:58:09AM -0300, Bruno Oliveira wrote: >> I would actually vote to change the ex

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread RonnyPfannschmidt
Hi all, it seems to me that a change to https://github.com/pytest-dev/pytest/blob/master/src/_pytest/mark/legacy.py#L28 in addition to ensuring lowercase of the expression is all that's needed on the technical side on the release management side its a breaking change that needs a major r

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Bruno Oliveira
Thanks everyone for their input! Christoph feel free to open a PR targeting the `features` branch with this change. For now I don't think we need an option to revert to the old behavior; if people claim for it we can consider adding it in the future though. Cheers, Bruno On Wed, Dec 4, 2019 at

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Oscar Benjamin
As an aside, I would often like to use -k and have an exact match so e.g. I do $ pytest -k test_xxx and I want that to run test_xxx only and not test_xxx_1 etc. Is there a way to do that? -- Oscar On Wed, 4 Dec 2019 at 20:56, Bruno Oliveira wrote: > > Thanks everyone for their input! > > C

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Bruno Oliveira
Hi Oscar, Not right now, the matching is always partial... not sure how we could signal to `-k` that we want an exact match of the last part of the node id (which seems what you want). Cheers, On Wed, Dec 4, 2019 at 7:40 PM Oscar Benjamin wrote: > As an aside, I would often like to use -k and

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Floris Bruynooghe
Using the full test id as shown by -v is what I always use for this case instead of using -k On Wed, 4 Dec 2019, 23:58 Bruno Oliveira, wrote: > Hi Oscar, > > Not right now, the matching is always partial... not sure how we could > signal to `-k` that we want an exact match of the last part of th

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Oscar Benjamin
Ah thanks. I guess you mean $ pytest somefile.py::test_xxx which does indeed work. It would be nice if that string were included in the output from test failures. -- Oscar On Wed, 4 Dec 2019 at 23:12, Floris Bruynooghe wrote: > > Using the full test id as shown by -v is what I always use f

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Brian Okken
Oscar, > " It would be nice if that string were included in the output from test failures. " I'm pretty sure it is. ... === short test summary info === FAILED test_foo.py::test_one_more = 1 failed, 1 passed in 0.16 seconds

Re: [pytest-dev] -k EXPRESSION: How to allow for case-insensitive matching

2019-12-04 Thread Brian Okken
Oops. My bad. I'm used to running with -ra or -rf, which will produce the summary with the test names. - Brian On Wed, Dec 4, 2019 at 3:37 PM Brian Okken wrote: > Oscar, > > " It would be nice if that string were included in the output from test > failures. " > I'm pretty sure it is. > ... > ===

[pytest-dev] [proposal] installing the psf-chronegrapher into pytest-dev

2019-12-04 Thread RonnyPfannschmidt
Hi everyone, in https://github.com/pytest-dev/pytest/issues/6080 it was noted that https://github.com/apps/psf-chronographer ensures towncrier notes are in prs, i would like to  propose enabling it for all of pytest-dev  Ronny ___ pytest-dev mail