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
23 lines
623 B
Python
23 lines
623 B
Python
"""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()
|