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 would be case-insensitive. :) > I also acknowledge that the default behaviour can't be changed as it would > break existing code. > Not sure, -k is usually used interactively, not being part of CI configuration ("usually", I certainly can see it being used as such to select a sub-set of tests for a specific CI run, for example "-k integration"). > I have not found a way to customize this with the existing CLI/hooks. > > Do you think there is any possibility to add some CLI/config option like > "--case-insensitive-expression" to make this configurable, or do you > consider this to belong to userland? A hook to allow changing the behaviour > from a pytest plugin would be totally sufficient as well. I'd be willing to > provide a PR if there is any interest. > 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" than an exact match, as it matches against any portion of the node id currently anyway. Does anybody sees this differently? Cheers, Bruno
_______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev