File: test.py

package info (click to toggle)
geximon 0.7.7-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 288 kB
  • ctags: 242
  • sloc: python: 1,794; xml: 108; makefile: 61
file content (43 lines) | stat: -rwxr-xr-x 1,141 bytes parent folder | download | duplicates (5)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python
"""Geximon unit testing module."""

import unittest
import doctest

import sys
sys.path.insert(0, '..')

class TestWindows(unittest.TestCase):

    def test_createGEximonWindow(self):
        from geximon.geximon import GEximonWindow
        win = GEximonWindow()

    def test_createProcessWindow(self):
        from geximon.geximon import ProcessWindow
        from geximon.preferences import Preferences
        prefs = Preferences()
        w = ProcessWindow(prefs)

    def test_createPopupWindow(self):
        from geximon.widgets import PopupWindow
        w = PopupWindow("title", "text")


class TestPreferences(unittest.TestCase):

    def test_createDialog(self):
        from geximon.preferences import Preferences, PreferencesDialog
        prefs = Preferences()
        dlg = PreferencesDialog(None, prefs)


if __name__ == '__main__':
    suite = unittest.TestSuite()

    from geximon import exim
    suite.addTest(doctest.DocTestSuite(exim))

    suite.addTest(unittest.makeSuite(TestWindows))
    suite.addTest(unittest.makeSuite(TestPreferences))
    unittest.TextTestRunner(verbosity=2).run(suite)