File: testgnome.py

package info (click to toggle)
gnome-python 2.28.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,288 kB
  • sloc: sh: 10,219; ansic: 7,997; xml: 2,464; python: 1,886; makefile: 392
file content (17 lines) | stat: -rw-r--r-- 544 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import unittest
import pygtk; pygtk.require("2.0")
import common
import tempfile
from common import gnome

class GnomeTest(unittest.TestCase):
    def testProgramInit(self):
        prog = gnome.program_init("foo", "bar", properties={"app-libdir": "foo"})
        self.assertEqual(prog.get_property("app-libdir"), "foo")

    def testPopt(self):
        popt_table = [("text", "", None, None, 0, "Test option", "")]
        program = gnome.program_init("test-case", "0.1", popt_table=popt_table)

if __name__ == '__main__':
    unittest.main()