bpo-43916: Use test.support.check_disallow_instantiation in test_tcl by erlend-aasland · Pull Request #26412 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation4 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
From issue 43988:
Serhiy suggested to write an unit test for curses.ncurses_version:
> https://bugs.python.org/issue43916#msg391936
Excerpt from msg391936:
I think it is better to add tests for different modules in corresponding module test files. They are pretty trivial, for example:
def test_new_tcl_obj(self):
self.assertRaises(TypeError, _tkinter.Tcl_Obj)
@requires_curses_func('panel')
def test_new_curses_panel(self):
w = curses.newwin(10, 10)
panel = curses.panel.new_panel(w)
self.assertRaises(TypeError, type(panel))
test_new_curses_panel
was added in GH-25748 and then converted to use the support helper in GH-26392.
I'm not sure if it makes sense to add a test for curses.ncurses_version
.
Thanks @erlend-aasland for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
(cherry picked from commit e90e042)
Co-authored-by: Erlend Egeberg Aasland erlend.aasland@innova.no
vstinner pushed a commit that referenced this pull request
(cherry picked from commit e90e042)
Co-authored-by: Erlend Egeberg Aasland erlend.aasland@innova.no