mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
tests: Don't require tkinter to be able to run test suite
This commit is contained in:
parent
d659d5fe25
commit
c203b0f786
@ -1,5 +1,4 @@
|
|||||||
import sys
|
import sys
|
||||||
import tkinter as tk
|
|
||||||
import pytest
|
import pytest
|
||||||
from panda3d import core
|
from panda3d import core
|
||||||
from direct.showbase.ShowBase import ShowBase
|
from direct.showbase.ShowBase import ShowBase
|
||||||
@ -14,6 +13,8 @@ def base():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def tk_toplevel():
|
def tk_toplevel():
|
||||||
|
tk = pytest.importorskip('tkinter')
|
||||||
|
|
||||||
if sys.platform == 'darwin' and not core.ConfigVariableBool('want-tk', False):
|
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')
|
pytest.skip('"want-tk" must be true to use tkinter with Panda3D on macOS')
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user