pytest icon indicating copy to clipboard operation
pytest copied to clipboard

more safe defaults for norecursedirs

Open RonnyPfannschmidt opened this issue 9 years ago • 4 comments

#1978 exposed that some norecurse directories have a name that is very sane to use outside of a project root

this issue is pretty tricky to debug

we should evaluate more strict evaluation of those and allowing folder names like "build" and "dist" inside normal python packages

RonnyPfannschmidt avatar Oct 04 '16 12:10 RonnyPfannschmidt

I just bumped into this issue after some relatively considerable time waste. I would suggest one of the below

  • not ignoring anything by default
  • still load tests from ignored directories and show them as skipped in the test report
  • more explicitly logging when any directory is ignored

4sfaloth avatar Feb 22 '22 15:02 4sfaloth

Ditto, this was very confusing to debug.

Newbytee avatar Nov 06 '25 16:11 Newbytee

Can you please elaborate a bit on what exactly was the problem in your case? Was it build/ as well as outlined in #1978?

The-Compiler avatar Nov 06 '25 16:11 The-Compiler

Yes, precisely that. For context, I'm working on a project which includes functionality for building other software, so naturally I put the tests for that in a directory named build to match the name of the directory that contains the implementation code.

Newbytee avatar Nov 06 '25 16:11 Newbytee