New submission from Terry J. Reedy <tjre...@udel.edu>:

import test.test_idle as ti
import unittest as u
u.main(ti)

has one failure:
Traceback (most recent call last):
  File "C:\Programs\Python39\lib\idlelib\idle_test\test_autocomplete.py", line 
230, in test_fetch_completions
    if __main__.__file__ != ac.__file__:
AttributeError: module '__main__' has no attribute '__file__'

ac = autocomplete. The condition is followed by 
            self.assertNotIn('AutoComplete', small)  # See issue 36405

which is false when ac is run as main to run the test.  Adding 
"hasattr(__main__, '__file__') and " to the beginning of the condition should 
be sufficient.  I should add a note to #36405 explaining this conditional 
assertion better.

----------
assignee: terry.reedy
components: IDLE
messages: 369555
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: make autocomplete test run without __main__.__file__
type: behavior
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40723>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to