This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tkinter tests that fail on linux in tiling window manager
Type: behavior Stage: test needed
Components: Tkinter Versions: Python 3.6, Python 3.4, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: The Compiler, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2015-08-27 16:44 by terry.reedy, last changed 2022-04-11 14:58 by admin.

Messages (3)
msg249237 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-08-27 16:44
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.
msg249285 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-08-28 18:00
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.
msg249472 - (view) Author: Florian Bruhin (The Compiler) * Date: 2015-09-01 09:24
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?
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69134
2015-09-01 09:25:19The Compilersetnosy: - The-Compiler
2015-09-01 09:24:13The Compilersetnosy: + The Compiler
messages: + msg249472
2015-08-28 18:00:37serhiy.storchakasetmessages: + msg249285
2015-08-27 16:44:16terry.reedycreate