Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Without this change, running `pytest --collect-only --doctest-modules --full-trace` on https://github.com/NickCrews/mismo takes 2.76s. With this change, it takes 1.21s This is because every time pytest visits a module during test collection, it has to determine if each object inside the module is a test. During that process, it calls https://github.com/pytest-dev/pytest/blob/77f2c63a542fc9511f5919ddf7f4b64d237fda07/src/_pytest/python.py#L343, on every item. If I have a module where I do `import ibis`, then this means that we attempt to do `ibis.__test__`, which triggers the `__getattr__` function in `ibis/__init__.py`, which then goes out and loads the entry points. Turns out this is a slow process.
- Loading branch information