bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)
This was the only failure running unittest.main(test.test_idle) after imports.
(cherry picked from commit 905b3cd05f
)
Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
This commit is contained in:
parent
0af9bef61a
commit
82397e2d97
|
@ -3,6 +3,8 @@ Released on 2019-12-16?
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
|
|
||||||
|
bpo-40723: Make test_idle pass when run after import.
|
||||||
|
|
||||||
bpo-38689: IDLE will no longer freeze when inspect.signature fails
|
bpo-38689: IDLE will no longer freeze when inspect.signature fails
|
||||||
when fetching a calltip.
|
when fetching a calltip.
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ class AutoCompleteTest(unittest.TestCase):
|
||||||
acp = self.autocomplete
|
acp = self.autocomplete
|
||||||
small, large = acp.fetch_completions(
|
small, large = acp.fetch_completions(
|
||||||
'', ac.ATTRS)
|
'', ac.ATTRS)
|
||||||
if __main__.__file__ != ac.__file__:
|
if hasattr(__main__, '__file__') and __main__.__file__ != ac.__file__:
|
||||||
self.assertNotIn('AutoComplete', small) # See issue 36405.
|
self.assertNotIn('AutoComplete', small) # See issue 36405.
|
||||||
|
|
||||||
# Test attributes
|
# Test attributes
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Make test_idle pass when run after import.
|
Loading…
Reference in New Issue