Skip to content

With python 3 modules are importable even without __init__.py #1383

Closed
@felix-ht

Description

@felix-ht

With https://peps.python.org/pep-0420/ - released with python 3.3 it is no longer required to create an empty __init__.py file.

However Coverage still skips folders without an __init__.py

if i > 0 and '__init__.py' not in filenames:

This causes unexpected results for the total coverage as valid python code is not included in the total coverage!

rel: pytest-dev/pytest-cov#88 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions