File: test_event_loop_helper.py

package info (click to toggle)
python-pyface 8.0.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,944 kB
  • sloc: python: 54,107; makefile: 82
file content (28 lines) | stat: -rw-r--r-- 907 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) 2005-2023, Enthought Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license.  The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
# Thanks for using Enthought open source!
import unittest

from traits.api import HasTraits, provides

from pyface.i_gui import IGUI
from pyface.ui.qt.util.event_loop_helper import EventLoopHelper


@provides(IGUI)
class DummyGUI(HasTraits):
    pass


class TestEventLoopHelper(unittest.TestCase):

    def test_gui_trait_expects_IGUI_interface(self):
        # Trivial test where we simply set the trait
        # and the test passes because no errors are raised.
        event_loop_helper = EventLoopHelper()
        event_loop_helper.gui = DummyGUI()