From c203b0f786458e169a9238ab06af0cf411942ab6 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 Aug 2023 10:29:32 +0200 Subject: [PATCH] tests: Don't require tkinter to be able to run test suite --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 9c2a01c6ca..4735ef99bf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,4 @@ import sys -import tkinter as tk import pytest from panda3d import core from direct.showbase.ShowBase import ShowBase @@ -14,6 +13,8 @@ def base(): @pytest.fixture def tk_toplevel(): + tk = pytest.importorskip('tkinter') + if sys.platform == 'darwin' and not core.ConfigVariableBool('want-tk', False): pytest.skip('"want-tk" must be true to use tkinter with Panda3D on macOS') try: