pytest-dev / pytest

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

Test collection in directories when files from them also specified #12550

Open Alexander-Shukaev opened 4 days ago

Alexander-Shukaev commented 4 days ago

If on the command line Pytest is given directories from where to collect tests and also some individual files from some of these directories, then it appears that such directories are skipped and only those individual files are collected. I would expect a file specification to be just a duplicate in this case that should be filtered out and instead all files from its directory to be collected instead since the directory was specified in the first place.