Skip to content

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-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-bot bedevere-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-aasland erlend-aasland marked this pull request as ready for review July 23, 2023 22:36
@erlend-aasland erlend-aasland requested a review from sobolevn July 23, 2023 22:37
@erlend-aasland
Copy link
Contributor Author

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

@erlend-aasland
Copy link
Contributor Author

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

@sobolevn sobolevn 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-aasland and others added 2 commits July 24, 2023 10:12
Co-authored-by: Nikita Sobolev <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
@erlend-aasland
Copy link
Contributor Author

Thanks for the review, Nikita!

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

👍

@erlend-aasland erlend-aasland requested a review from sobolevn July 24, 2023 15:47
Copy link
Member

@sobolevn sobolevn 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-aasland erlend-aasland merged commit 83a2837 into python:main Jul 24, 2023
@erlend-aasland erlend-aasland deleted the clinic/coverage-cli branch July 24, 2023 18:49
@erlend-aasland erlend-aasland added the needs backport to 3.11 only security fixes label Jul 24, 2023
@erlend-aasland erlend-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 <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-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 <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-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 <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
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 <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
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 <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants