Skip to content

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commented Jul 23, 2023

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicWholeFileTest ClinicExternalTest test suite.

TODO:

  • Remove tmp stuff from test_external, use -o to redirect the output, and simply compare the redirected output with clinic.test.c
  • A new test that verifies that the file is not touched if no changes are made (currently a part of test_external)
  • A test that verifies that an incorrect output checksum (and the generated output) is regenerated if -f is given
  • Test verbose mode

Instead of hacking into the Clinic class, use the Argument Clinic tool to run the ClinicWholeFileTest test suite.
@bedevere-botbedevere-bot added the tests Tests in the Lib/test dir label Jul 23, 2023
test_external: run clinic on clinic.test.c test_no_change: check that dest is left unchanged if content does not change
@erlend-aaslanderlend-aasland marked this pull request as ready for review July 23, 2023 22:36
@erlend-aasland
Copy link
ContributorAuthor

FWIW; this messes up test coverage locally; that's solvable (IIRC), though.

@erlend-aasland
Copy link
ContributorAuthor

The coveragerc file that's included in the sources disables coverage for if __name__ == "__main__", which is unfortunate; we should change that.

Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

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

Better error messages :)

erlend-aaslandand others added 2 commits July 24, 2023 10:12
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@erlend-aasland
Copy link
ContributorAuthor

Thanks for the review, Nikita!

Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

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

Looks great! 👍

@erlend-aaslanderlend-aasland merged commit 83a2837 into python:mainJul 24, 2023
@erlend-aaslanderlend-aasland deleted the clinic/coverage-cli branch July 24, 2023 18:49
@erlend-aaslanderlend-aasland added the needs backport to 3.11 only security fixes label Jul 24, 2023
@erlend-aaslanderlend-aasland added the needs backport to 3.12 only security fixes label Jul 24, 2023
@miss-islington
Copy link
Contributor

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 24, 2023
…-107156) Instead of hacking into the Clinic class, use the Argument Clinic tool to run the ClinicExternalTest test suite. (cherry picked from commit 83a2837) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot
Copy link

GH-107189 is a backport of this pull request to the 3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12 only security fixes label Jul 24, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 24, 2023
…-107156) Instead of hacking into the Clinic class, use the Argument Clinic tool to run the ClinicExternalTest test suite. (cherry picked from commit 83a2837) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot
Copy link

GH-107190 is a backport of this pull request to the 3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11 only security fixes label Jul 24, 2023
erlend-aasland added a commit that referenced this pull request Jul 24, 2023
…) (#107189) Instead of hacking into the Clinic class, use the Argument Clinic tool to run the ClinicExternalTest test suite. (cherry picked from commit 83a2837) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
erlend-aasland added a commit that referenced this pull request Jul 26, 2023
…) (#107190) Instead of hacking into the Clinic class, use the Argument Clinic tool to run the ClinicExternalTest test suite. (cherry picked from commit 83a2837) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 26, 2023
…ythonGH-107156) (python#107190) Instead of hacking into the Clinic class, use the Argument Clinic tool to run the ClinicExternalTest test suite. (cherry picked from commit 83a2837) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
jtcave pushed a commit to jtcave/cpython that referenced this pull request Jul 27, 2023
…07156) Instead of hacking into the Clinic class, use the Argument Clinic tool to run the ClinicExternalTest test suite. Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@erlend-aasland@miss-islington@bedevere-bot@sobolevn