The test_grid_layout functions fail on macOS
See original GitHub issueWhen I follow the Development document I get errors from the test_grid_layout
functions.
To Reproduce
Run pytest -v -k test_grid_layout
inside the tests
directory
Expected behaviour The tests should pass
Screenshots
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Box(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_box.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Box] object (may also contain other objects), x = 1, y = 2
col_span = 1, row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
================================== FAILURES ===================================
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Box(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_box.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Box] object (may also contain other objects), x = 1, y = 2
col_span = 1, row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = ButtonGroup(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_buttongroup.py:270:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [ButtonGroup] object with selected option "None", x = 1, y = 2
col_span = 1, row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = CheckBox(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_checkbox.py:217:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [CheckBox] object with text "", x = 1, y = 2, col_span = 1
row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Combo(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_combo.py:276:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Combo] object with options [], x = 1, y = 2, col_span = 1
row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Drawing(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_drawing.py:164:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Drawing] object, x = 1, y = 2, col_span = 1, row_span = 1
align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = ListBox(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_listbox.py:283:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [ListBox] object, x = 1, y = 2, col_span = 1, row_span = 1
align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Picture(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_picture.py:171:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Picture] object, x = 1, y = 2, col_span = 1, row_span = 1
align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = PushButton(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_pushbutton.py:262:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [PushButton] object with text "Button", x = 1, y = 2, col_span = 1
row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Slider(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_slider.py:210:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Slider] object from 0 to 100, x = 1, y = 2, col_span = 1
row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Text(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_text.py:161:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Text] object with text "", x = 1, y = 2, col_span = 1, row_span = 1
align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = TextBox(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_textbox.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [TextBox] object with text "", x = 1, y = 2, col_span = 1
row_span = 1, align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
______________________________ test_grid_layout _______________________________
def test_grid_layout():
a = App(layout="grid")
w = Waffle(a, grid=[1,2])
> grid_layout_test(w, 1, 2, 1, 1, None)
test_waffle.py:294:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
widget = [Waffle] object (3x3), x = 1, y = 2, col_span = 1, row_span = 1
align = None
def grid_layout_test(widget, x, y, col_span, row_span, align):
sticky = {"top": "n", "bottom": "s", "left": "w", "right": "e", None: ""}
# test initial values
assert widget.master.layout == "grid"
> assert widget.tk.grid_info()["column"] == x
E AssertionError: assert '1' == 1
E -'1'
E +1
common_test.py:365: AssertionError
---------------------------- Captured stdout call -----------------------------
------------------------------------------------------------
*** GUIZERO WARNING ***
There should only be 1 guizero App, use Window to create multiple windows.
------------------------------------------------------------
System information:
platform darwin -- Python 3.7.3, pytest-5.3.0, py-1.8.0, pluggy-0.13.1
- OS: macOS 10.14.6
- guizero version: 1.1.0 (
dev
branch, but seems to happen at the1.1.0
tag too)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
Vue 3 branch installation #617 - GitHub
Failed to resolve component: GridItem If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.
Read more >Understanding the SwiftUI grid layout - LogRocket Blog
We'll demonstrate how to create grids with SwiftUI by developing a reminder app that helps you categorize your reminders with a due date...
Read more >442954 - [CSS Grid Layout] Undefined named lines placement
Mainly we're not following this statement from the spec: "If a name is given as a <custom-ident>, only lines with that name are...
Read more >Browser Compatibility Testing of CSS Grid Layout - LambdaTest
With LambdaTest you can perform browser comatibility testing of CSS Grid Layout element across 3000+ browser-OS combinations.
Read more >CSS Grid Layout - CSS: Cascading Style Sheets | MDN
CSS Grid Layout excels at dividing a page into major regions or defining the relationship in terms of size, position, and layer, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have brought my mac up to date with the latest version of Catalina and perhaps more importantly Python 3.8 which introduces tkinter 8.6.
I can no longer recreate the issue using the
dev
build so I will tag the issue as ready. I suspect version issues within macOS.The change will go “live” and into master with the next release.
Hmmm. I am going to bring my test mac up to date and retest.
It suspect that while we are running the same minor version
8.5
we are using a different revisions8.5.#
. It is also a bit suspicious thatpython3 -m tkinter
does show a working GUI for you.If I cant recreate I will close the issue as the original problem is resolved.