aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qtcore/qsrand_test.py
blob: 97d0a3b0b118fcd169fd6fcfaad0c4e660888a53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gc
import unittest

from PySide.QtCore import qsrand

class OverflowExceptionCollect(unittest.TestCase):
    '''Test case for OverflowError exception during garbage collection. See bug #147'''

    def testOverflow(self):
        # NOTE: PyQt4 raises TypeError, but boost.python raises OverflowError
        self.assertRaises(OverflowError, qsrand, 42415335332353253)
        # should not abort if bug #147 is fixed
        gc.collect()

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