Skip to content

Tkinter tests that fail on linux in tiling window manager #69134

Description

@terryjreedy
BPO 24946
Nosy @terryjreedy, @serhiy-storchaka, @The-Compiler

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 = None
created_at = <Date 2015-08-27.16:44:16.845>
labels = ['type-bug', 'expert-tkinter']
title = 'Tkinter tests that fail on linux in tiling window manager'
updated_at = <Date 2015-09-01.09:25:19.131>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2015-09-01.09:25:19.131>
actor = 'The Compiler'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Tkinter']
creation = <Date 2015-08-27.16:44:16.845>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 24946
keywords = []
message_count = 3.0
messages = ['249237', '249285', '249472']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'serhiy.storchaka', 'The Compiler']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'test needed'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue24946'
versions = ['Python 3.4', 'Python 3.5', 'Python 3.6']

Linked PRs

Activity

  1. terryjreedy commented on Aug 27, 2015

    @terryjreedy
    MemberAuthor

    Serhiy, Florian emailed this to me in response to my pydev post on Linux gui tests. I'll let you decide if you think anything needs to be done.

    >>>>>>from Florian
    FWIW, those tests seem to fail when using a tiling window manager
    (herbstluftwm):

    ======================================================================
    FAIL: test_pack_configure_anchor (tkinter.test.test_tkinter.test_geometry_managers.PackTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 48, in test_pack_configure_anchor
        check('n', '30x70+135+20')
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 47, in check
        self.assertEqual(a.winfo_geometry(), geom)
    AssertionError: '30x70+210+20' != '30x70+135+20'
    - 30x70+210+20
    ?       - ^
    + 30x70+135+20
    ?        ^^

    ======================================================================
    FAIL: test_pack_configure_expand (tkinter.test.test_tkinter.test_geometry_managers.PackTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 86, in test_pack_configure_expand
        check('20x40+0+80', '50x30+135+0', '80x80+220+75', '40x30+100+170')
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 78, in check
        self.assertEqual(a.winfo_geometry(), geoms[0])
    AssertionError: '20x40+0+102' != '20x40+0+80'
    - 20x40+0+102
    ?         ^ -
    + 20x40+0+80
    ?         ^

    ======================================================================
    FAIL: test_pack_configure_padx_ipadx_fill (tkinter.test.test_tkinter.test_geometry_managers.PackTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 125, in test_pack_configure_padx_ipadx_fill
        check('20x40+260+80', '240x200+0+0', side='right', padx=20)
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 123, in check
        self.assertEqual(a.winfo_geometry(), geom1)
    AssertionError: '20x40+412+102' != '20x40+260+80'
    - 20x40+412+102
    + 20x40+260+80

    ======================================================================
    FAIL: test_pack_configure_pady_ipady_fill (tkinter.test.test_tkinter.test_geometry_managers.PackTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 167, in test_pack_configure_pady_ipady_fill
        check('20x40+280+80', '280x200+0+0', side='right', pady=20)
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 165, in check
        self.assertEqual(a.winfo_geometry(), geom1)
    AssertionError: '20x40+432+102' != '20x40+280+80'
    - 20x40+432+102
    + 20x40+280+80

    ======================================================================
    FAIL: test_pack_configure_side (tkinter.test.test_tkinter.test_geometry_managers.PackTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 208, in test_pack_configure_side
        check('top', '20x40+140+0', '300x160+0+40')
      File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 206, in check
        self.assertEqual(a.winfo_geometry(), geom1)
    AssertionError: '20x40+216+0' != '20x40+140+0'
    - 20x40+216+0
    ?       - ^
    + 20x40+140+0
    ?        ^^

    They however run fine in floating mode, so I'm guessing this is just a
    limitation of those tests.

  2. serhiy-storchaka commented on Aug 28, 2015

    @serhiy-storchaka
    Member

    I already added a workaround to pass these tests on my netbook (new windows are opened maximized on it). May be there is a way to make a window floating in tiled window manager in Tk.

  3. The-Compiler commented on Sep 1, 2015

    The-Compilermannequin
    Mannequin

    At least with my WM, there is no concept of having floating windows when in tiling mode, so I don't think that would be possible.

    I also don't think there's a standard way to tell a window manager to not tile windows.

    What about opening a simple window with a fixed geometry, checking if this was changed by the WM, and if it is, skip those tests?

  4. transferred this issue fromon Apr 10, 2022
  5. added 11 commits that reference this issue on Jun 28, 2026
  6. serhiy-storchaka commented on Jul 5, 2026

    @serhiy-storchaka
    Member

    The GUI tests that assumed a window is mapped immediately with a usable geometry now go through require_mapped() / wait_until_mapped() (in test.test_tkinter.support), which waits for the window manager to map the window and skips cleanly when it won't — so they no longer fail under tiling WMs like herbstluftwm. Done across #152499, #152599 and #152690. Closing as fixed — thanks for the report!

  7. added 3 commits that reference this issue on Jul 5, 2026
  8. serhiy-storchaka commented on Jul 9, 2026

    @serhiy-storchaka
    Member

    NotebookTest.test_traversal wasn't covered by GH-152499 and still fails intermittently on a real X11 display: identify(5, 5) is called before the notebook reaches its requested size, so the pixel lands outside the first tab and returns ''. Reopening to harden it.

  9. added 3 commits that reference this issue on Jul 9, 2026
  10. added a commit that references this issue on Jul 10, 2026
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions