Skip to content

Cannot run gui tests twice. #64999

Closed
Closed

Description

@terryjreedy
BPO 20800
Nosy @terryjreedy, @ned-deily, @serhiy-storchaka

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2018-12-12.08:04:08.567>
created_at = <Date 2014-02-28.00:06:01.334>
labels = ['tests', 'type-bug', 'expert-tkinter']
title = 'Cannot run gui tests twice.'
updated_at = <Date 2018-12-12.08:04:08.566>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2018-12-12.08:04:08.566>
actor = 'terry.reedy'
assignee = 'none'
closed = True
closed_date = <Date 2018-12-12.08:04:08.567>
closer = 'terry.reedy'
components = ['Tests', 'Tkinter']
creation = <Date 2014-02-28.00:06:01.334>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 20800
keywords = []
message_count = 10.0
messages = ['212397', '212400', '212401', '212402', '212404', '219529', '219548', '219591', '331672', '331676']
nosy_count = 4.0
nosy_names = ['terry.reedy', 'ned.deily', 'serhiy.storchaka', 'Saimadhav.Heblikar']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue20800'
versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

Activity

  1. terryjreedy commented on Feb 28, 2014

    @terryjreedy
    MemberAuthor

    After the fix for bpo-20567, running test_idle and then test_ttk_guionly works, but running either after itself does not. Example command and output, which is same running with installed 3.4.0rc1 (Feb 11) or fresh debug build.

    F:\Python\dev> 4\py34\pcbuild\python_d.exe -m test -ugui test_ttk_guionly test_ttk_guionly
    [1/2] test_ttk_guionly
    Warning -- os.environ was modified by test_ttk_guionly
    [2/2] test_ttk_guionly
    test test_ttk_guionly crashed -- Traceback (most recent call last):
      File "F:\Python\dev\4\py34\lib\test\test_ttk_guionly.py", line 35, in test_main
        *runtktests.get_tests(text=False, packages=['test_ttk']))
      File "F:\Python\dev\4\py34\lib\test\support\__init__.py", line 1719, in run_unittest
        _run_suite(suite)
      File "F:\Python\dev\4\py34\lib\test\support\__init__.py", line 1694, in _run_suite
        raise TestFailed(err)
    test.support.TestFailed: multiple errors occurred; run in verbose mode for details
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "F:\Python\dev\4\py34\lib\test\regrtest.py", line 1278, in runtest_inner
        test_runner()
      File "F:\Python\dev\4\py34\lib\test\test_ttk_guionly.py", line 37, in test_main
        get_tk_root().destroy()
      File "F:\Python\dev\4\py34\lib\tkinter\test\support.py", line 60, in get_tk_root
        root = tkinter.Tk()
      File "F:\Python\dev\4\py34\lib\tkinter\__init__.py", line 1807, in __init__
        self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
    _tkinter.TclError: Can't find a usable init.tcl in the following directories:
        F:/Python/dev/4/py34/lib/tcl8.6 F:/Python/dev/4/py34/lib/tcl8.6 F:/Python/dev/4/lib/tcl8.6 F:/Python/dev/4/py34/library F:/Python/dev/4/library F:/Python/dev/4/tcl8.6.1/library F:/Python/dev/tcl8.6.1/library

    init.tcl *is* in 4/tcl8.6.1.0/library and 4/tcltk/tcl8.6/lib. I believe it is usually found in the latter.

    This might be Windows only.

  2. added
    tests
    type-bug
    on Feb 28, 2014
  3. ned-deily commented on Feb 28, 2014

    @ned-deily
    Member

    The "Warning -- os.environ was modified by test_ttk_guionly" looks suspicious. Does the patch for bpo-20035 help?

  4. terryjreedy commented on Feb 28, 2014

    @terryjreedy
    MemberAuthor

    The bpo-20035 patch removes the warning but the rest is the same.

  5. ned-deily commented on Feb 28, 2014

    @ned-deily
    Member

    What happens if you add -v (verbose) "... -m test -v -ugui ..." to find the failing tests?

  6. terryjreedy commented on Feb 28, 2014

    @terryjreedy
    MemberAuthor

    With 3.3 and the patch still applied, all 13 test methods fail with tracebacks that end with the _tkinter.create call, as above. For Idle, there are 3 tracebacks for the 3 modules with gui tests.

  7. ned-deily commented on Jun 1, 2014

    @ned-deily
    Member

    For what it's worth, I don't see the problem on OS X (haven't tried it recently on a Linux system), so it might be a Windows only issue. It's become clearer that some test combinations can only be safely run with the regrtest -j option to run them as separate subprocesses. I Does "-m test -j2 -ugui test_ttk_guionly test_ttk_guionly" help?

  8. serhiy-storchaka commented on Jun 2, 2014

    @serhiy-storchaka
    Member

    Does recent patch for bpo-20035 help?

  9. SaimadhavHeblikar commented on Jun 2, 2014

    SaimadhavHeblikarmannequin
    Mannequin

    From Ned Deily's message.

    >haven't tried it recently on a Linux system

    Output from a linux syste:

    ./python -m test -ugui test_ttk_guionly test_ttk_guionly test_idle test_idle
    [1/4] test_ttk_guionly
    [2/4] test_ttk_guionly
    [3/4] test_idle
    [4/4] test_idle
    All 4 tests OK.

    So it confirms as a windows issue. Unfortunately, that's all I have to offer on this issue ATM.

  10. serhiy-storchaka commented on Dec 12, 2018

    @serhiy-storchaka
    Member

    I have just tested on Windows and all works to me. Terry, can you confirm that this issue is gone?

  11. terryjreedy commented on Dec 12, 2018

    @terryjreedy
    MemberAuthor

    Either test repeated works now.

  12. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    teststopic-tkintertype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions