MIL-008: Choose level
Review record RC-041 (Go, autonomous mode, not independent). Task: MIL-008#1 Task: MIL-008#2 Task: MIL-008#3 Task: MIL-008#4 Task: MIL-008#5 Task: MIL-008#6 Task: MIL-008#7 Task: MIL-008#8
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""Fixtures shared by the end-to-end tests."""
|
||||
|
||||
import tkinter as tk
|
||||
from collections.abc import Iterator
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def tk_root() -> Iterator[tk.Tk]:
|
||||
"""The one Tk root of the process, shared by every e2e module.
|
||||
|
||||
A second interpreter right after destroying the first fails to find
|
||||
init.tcl on some Windows Python installs, so there is only one. Each test
|
||||
builds its views on it and destroys their widgets afterwards.
|
||||
"""
|
||||
try:
|
||||
root = tk.Tk()
|
||||
except tk.TclError:
|
||||
pytest.skip("no display available for Tk")
|
||||
yield root
|
||||
root.destroy()
|
||||
Reference in New Issue
Block a user