Beispiel #1
0
 def test_fundamental_object_info(self):
     repo.require('Regress')
     info = repo.find_by_name('Regress', 'TestFundamentalObject')
     self.assertTrue(info.get_abstract())
     self.assertTrue(info.get_fundamental())
     self.assertEqual(info.get_ref_function(), 'regress_test_fundamental_object_ref')
     self.assertEqual(info.get_unref_function(), 'regress_test_fundamental_object_unref')
     self.assertEqual(info.get_get_value_function(), 'regress_test_value_get_fundamental_object')
     self.assertEqual(info.get_set_value_function(), 'regress_test_value_set_fundamental_object')
Beispiel #2
0
    def test_notify_signal_info_with_obj(self):
        repo.require('Regress')
        info = repo.find_by_name('Regress', 'TestObj')
        sig_info = find_child_info(info, 'get_signals', 'sig-with-array-prop')

        sig_flags = GObject.SignalFlags.RUN_LAST

        self.assertTrue(sig_info is not None)
        self.assertTrue(isinstance(sig_info, GIRepository.CallableInfo))
        self.assertTrue(isinstance(sig_info, GIRepository.SignalInfo))
        self.assertEqual(sig_info.get_name(), 'sig-with-array-prop')
        self.assertEqual(sig_info.get_class_closure(), None)
        self.assertFalse(sig_info.true_stops_emit())
        self.assertEqual(sig_info.get_flags(), sig_flags)
Beispiel #3
0
    def test_signal_info(self):
        repo.require('Regress')
        info = repo.find_by_name('Regress', 'TestObj')
        sig_info = find_child_info(info, 'get_signals', 'test')

        sig_flags = GObject.SignalFlags.RUN_LAST | \
            GObject.SignalFlags.NO_RECURSE | GObject.SignalFlags.NO_HOOKS

        self.assertTrue(sig_info is not None)
        self.assertTrue(isinstance(sig_info, GIRepository.CallableInfo))
        self.assertTrue(isinstance(sig_info, GIRepository.SignalInfo))
        self.assertEqual(sig_info.get_name(), 'test')
        self.assertEqual(sig_info.get_class_closure(), None)
        self.assertFalse(sig_info.true_stops_emit())
        self.assertEqual(sig_info.get_flags(), sig_flags)
Beispiel #4
0
 def setUp(self):
     repo.require('GLib')
     repo.require('GObject')
     repo.require('GIMarshallingTests')