def random_things(self):

        things = [1, 3.1415, QWidget(), None, ['a', 'list'],
                  {'a': 'dict'}, ('a', 'long', 'tuple')]

        for thing in things:
            with self.assertRaises(ValueError):
                _process_slots(thing)
Esempio n. 2
0
 def test_slot_with_None(self):
     x = ('signalname', None)
     assert _process_slots(x) == ('signalname', None)
Esempio n. 3
0
 def test_complete_slot(self):
     x = ('signalname', min)
     assert _process_slots(x) == ('signalname', min)
Esempio n. 4
0
 def test_callable(self):
     x = min
     assert _process_slots(x) == ('default', min)
Esempio n. 5
0
 def test_specials(self):
     for x in _specials:
         assert _process_slots(x) is x