File: gitest.py

package info (click to toggle)
pygobject 3.54.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,864 kB
  • sloc: ansic: 40,281; python: 26,363; sh: 477; makefile: 81; xml: 35; cpp: 1
file content (19 lines) | stat: -rwxr-xr-x 470 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3

import unittest
import sys
from gi.repository import GLib


class TestGI(unittest.TestCase):
    def test_glib_enum(self):
        '''GLib enum'''
        self.assertEqual(GLib.IOCondition.IN.value_nicks, ['in'])

    def test_method(self):
        '''GLib method call'''

        self.assertIn(GLib.find_program_in_path('bash'), ('/bin/bash', '/usr/bin/bash'))


unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))