Author terry.reedy
Recipients markroseman, ned.deily, python-dev, terry.reedy
Date 2016-08-10.22:18:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470867535.16.0.486477429205.issue27714@psf.upfronthosting.co.za>
In-reply-to
Content
I agree.  The issue may come up with other tests in the future.  I just decided to do the part I knew how to do first ;-).

For #18409, I added the mac call to Phil's original patch with the vague comment "now needed to run without raising".  But it is not needed on Windows.  I suspect that the then new IDLE GSOC student, S.H., had emailed me after reviewing existing work.  He mostly worked on Linux, but I believe he had access to a Mac.

setupApp calls 4 fixup functions.  I am pretty sure that that the test itself does not need the failing menu fix overrideRootMenu, at least not now. (The case might be different if I ever add live EditorWindow tests.) Three days after the initial patch, the patch by S.H. for #21682 replaced EditorWindow with a mock.  The reason was to stop menu leaks.  But it should have also eliminated any need to patch the EditorWindow menu.

Two of the functions, addOpenEventSupport and hideTkConsole don't seem like they should ever be needed.  The last, should only matter for tests that generate the events involved (and only on 8.5).
 
So what happens if you comment out line 34?
  macosx.setupApp(cls.root, None)

If deleting the call is not possible, maybe we can replace it with something more specific.  If not, then the following should work, but at the cost of masking a possible IDLE bug (unless a new _utest=False parameter is added to the signature -- but I dislike adding such complications until really needed.)

first_time = True  # new
def setupApp(root, flist):
    ""
    if isAquaTk() and first_time:  # modified
        first_time = False  # new
        ...
History
Date User Action Args
2016-08-10 22:18:55terry.reedysetrecipients: + terry.reedy, ned.deily, markroseman, python-dev
2016-08-10 22:18:55terry.reedysetmessageid: <1470867535.16.0.486477429205.issue27714@psf.upfronthosting.co.za>
2016-08-10 22:18:55terry.reedylinkissue27714 messages
2016-08-10 22:18:54terry.reedycreate