Ran Benita
Ran Benita
### Possible Plan Looked at this again. The main trouble here stems from the fact that we have two recursive collectors -- `Session` and `Package` -- which step on each...
> It was undone for good reasons Do you remember what they were? I do suspect there is some issue here; the Directory solution is pretty natural and harmonious with...
@MarximusMaximus right. I'm not entirely sure how it would look like exactly, but that's the basic idea - `Directory` is a non-package directory, and `Package` is a yes-package directory (really...
In case I get hit by a bus, my WIP branch is here: https://github.com/bluetech/pytest/commits/pkg-collect It seems viable for sure, but very delicate.
### `Package` should not be a `Module` *This comment was extracted to #11137*
### `pytest_collect_directory` hook After the changes proposed in this issue, all of `Session`, `Package` and `Directory` would need to collect directories. It basically looks like this: ```py if (path /...
Amusingly I just realized that `pytest_collect_directory` already existed up to pytest 6.0, but was removed because it was broken: [deprecation doc](https://github.com/pytest-dev/pytest/blob/85c5bd26b6d94dca423c2c0c54717750eac81cae/doc/en/deprecations.rst#pytest-collect-directory-hook), [deprecation issue](https://github.com/pytest-dev/pytest/issues/571), [deprecation pr](https://github.com/pytest-dev/pytest/pull/6847), [removal pr](https://github.com/pytest-dev/pytest/pull/7660). So I propose...
After a lot of tinkering with obscure pytest behaviors (`keepduplicates`, conftest exceptions, eek), I managed to make the branch pass all tests. I'll now be working on preparing it for...
### Abstract `Directory` node, parent of `Dir` and `Package` One change I've made from the initial proposal is to add an abstract `nodes.Directory` node, which is analogous to `nodes.File` for...
### Order of files vs. directories in collection Previously, files in a directory were collected before sub-directories in the directory. That is, given a filesystem tree ``` top/ ├── aaa...