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

bpo-43988: Use check disallow instantiation helper #26392

Merged
merged 6 commits into from May 27, 2021

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented May 26, 2021

  • Use test.support.check_disallow_instantiation
  • Fix exception message regex for builtins

https://bugs.python.org/issue43988

@erlend-aasland erlend-aasland changed the title bpo-43988: Use check disallow instantiation bpo-43988: Use check disallow instantiation helper May 26, 2021
@erlend-aasland erlend-aasland requested a review from vstinner May 26, 2021
Copy link
Member

@vstinner vstinner left a comment

I suggest to avoid tp = ... and then use tp, since "tp" name doesn't help: use directly "...". I wrote some examples.

Lib/test/support/__init__.py Outdated Show resolved Hide resolved
Lib/test/test_curses.py Outdated Show resolved Hide resolved
Lib/test/test_dbm_gnu.py Outdated Show resolved Hide resolved
Lib/test/test_re.py Outdated Show resolved Hide resolved
Lib/test/test_select.py Outdated Show resolved Hide resolved
@vstinner vstinner merged commit fbff538 into python:main May 27, 2021
12 checks passed
@vstinner
Copy link
Member

vstinner commented May 27, 2021

Merged, thanks. This helper makes me more confident that the test actually checks that the type is immutable.

@erlend-aasland erlend-aasland deleted the use-check-disallow-inst branch May 27, 2021
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented May 27, 2021

Merged, thanks. This helper makes me more confident that the test actually checks that the type is immutable.

Great, thanks for reviewing and improving the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants