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

Increase Argument Clinic test coverage #106368

Closed
erlend-aasland opened this issue Jul 3, 2023 · 8 comments · Fixed by #107514 or #107582
Closed

Increase Argument Clinic test coverage #106368

erlend-aasland opened this issue Jul 3, 2023 · 8 comments · Fixed by #107514 or #107582
Labels
topic-argument-clinic type-feature A feature request or enhancement

Comments

@erlend-aasland
Copy link
Contributor

erlend-aasland commented Jul 3, 2023

The Argument Clinic test suite consists of three parts:

  • Lib/test/test_clinic.py: mostly parser tests
  • Lib/test/clinic.test: generated code, checked by test_clinic.py (ClinicExternalTest)
  • Modules/_testclinic.c: mostly converter tests (thanks, @colorfulappl!)

Test coverage is currently just above 80%, which is too low. I'd say we try to reach 90-something percent coverage.

Reminder: PRs for increased test coverage should be backported to all bugfix branches.

Linked PRs

@erlend-aasland erlend-aasland added type-feature A feature request or enhancement topic-argument-clinic labels Jul 3, 2023
@erlend-aasland
Copy link
Contributor Author

Also: a side effect of good coverage, is that it can help identify unreachable paths in the code.

@erlend-aasland
Copy link
Contributor Author

cc. @sobolevn, who I know enjoys increasing test coverage 📈

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 3, 2023
Add tests for 'self' and 'defining_class' converter requirements.
erlend-aasland added a commit that referenced this issue Jul 3, 2023
Add tests for 'self' and 'defining_class' converter requirements.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 3, 2023
)

Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c812)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 3, 2023
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 3, 2023
…n#106369)

Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c812)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
erlend-aasland added a commit that referenced this issue Jul 3, 2023
…106370)

Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c812)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 3, 2023
(cherry picked from commit 3ee8dac)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
erlend-aasland added a commit that referenced this issue Jul 3, 2023
…106374)

Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c812)
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 3, 2023
(cherry picked from commit 3ee8dac)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
erlend-aasland added a commit that referenced this issue Jul 3, 2023
erlend-aasland added a commit that referenced this issue Jul 3, 2023
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 3, 2023
Also assert parser error messages.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 3, 2023
(cherry picked from commit 648688c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 3, 2023
(cherry picked from commit 648688c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 3, 2023
Add:

- test_disallowed_gropuing__no_matching_bracket
- test_double_slash
@erlend-aasland erlend-aasland reopened this Aug 3, 2023
@erlend-aasland
Copy link
Contributor Author

Reopening to increase coverage for the DSL parser state machine and the docstring formatter.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 3, 2023
Add tests for DSL parser state machine and docstring formatting
@erlend-aasland erlend-aasland linked a pull request Aug 3, 2023 that will close this issue
erlend-aasland added a commit that referenced this issue Aug 3, 2023
Add tests for DSL parser state machine and docstring formatting
@erlend-aasland erlend-aasland reopened this Aug 3, 2023
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 3, 2023
Add tests for directives and destinations
erlend-aasland added a commit that referenced this issue Aug 4, 2023
Add tests for directives and destinations
@erlend-aasland
Copy link
Contributor Author

We're now at 93% coverage.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 15, 2023
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-argument-clinic type-feature A feature request or enhancement
Projects
None yet
2 participants