Example #1
0
    def test_not_string(self):

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

        for x in not_strings:
            with self.assertRaises(TypeError):
                assert _check_string(x)
Example #2
0
    def test_string(self):

        strings = ['a', 'foo', 'bar']
        for x in strings:
            assert _check_string(x) is x
Example #3
0
    def test_specials(self):

        for x in _specials:
            assert _check_string(x) is x