diff --git a/direct/src/gui/DirectGuiBase.py b/direct/src/gui/DirectGuiBase.py index e654c455c2..1348b0a2e3 100644 --- a/direct/src/gui/DirectGuiBase.py +++ b/direct/src/gui/DirectGuiBase.py @@ -81,6 +81,7 @@ __all__ = ['DirectGuiBase', 'DirectGuiWidget'] from panda3d.core import * from direct.showbase import ShowBaseGlobal +from direct.showbase import ShowBase from . import DirectGuiGlobals as DGG from .OnscreenText import * from .OnscreenGeom import * diff --git a/tests/gui/test_DirectButton.py b/tests/gui/test_DirectButton.py new file mode 100644 index 0000000000..6f85e72f59 --- /dev/null +++ b/tests/gui/test_DirectButton.py @@ -0,0 +1,6 @@ +from direct.gui.DirectButton import DirectButton + + +def test_button_destroy(): + btn = DirectButton(text="Test") + btn.destroy() diff --git a/tests/gui/test_DirectEntry.py b/tests/gui/test_DirectEntry.py index 4e462ebdbc..3382be3bda 100644 --- a/tests/gui/test_DirectEntry.py +++ b/tests/gui/test_DirectEntry.py @@ -3,6 +3,11 @@ from direct.gui.DirectEntry import DirectEntry import sys +def test_entry_destroy(): + entry = DirectEntry() + entry.destroy() + + def test_entry_get(): entry = DirectEntry() assert isinstance(entry.get(), str)