Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TestCoverage properly typed and self-documenting #1887

Draft
wants to merge 5 commits into
base: 0.4.x
Choose a base branch
from

Conversation

bartfeenstra
Copy link
Owner

@bartfeenstra bartfeenstra commented Aug 23, 2024

To do

  • allow _Testable to get a coverage sequence to indicate classes or methods with a non-standard name the testable is covered by
  • we currently ignore methods from parent classes. Do not ignore them if the classes these are declared in are private; the first public/concrete class must test a method

@bartfeenstra bartfeenstra added enhancement New feature or request python Pull requests that update Python code labels Aug 23, 2024
@bartfeenstra bartfeenstra added this to the 0.4.x milestone Aug 23, 2024


@lru_cache
def get_coveragerc_ignore_modules() -> Sequence[Path]:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this return importable strings

pass


class Method(Testable):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about properties?

)


class MissingReason(Enum):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the APIs to test_utils?

continue

yield imported_member
class Class(HasChildren[Method]):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this add its own testable members



class _ModuleFunctionCoverageTester:
class Module(HasChildren[Union["Module", Class, Function]]):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this add its own testable members

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an internal method add_undefined_children()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant