summaryrefslogtreecommitdiffstats
path: root/tests/QtCore/qabs_test.py
blob: 1727ae6d5639b693372b094b04622fd5ef3c42b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import unittest

from PySide import QtCore


class QAbsTest(unittest.TestCase):
    '''Tests for QtCore.qAbs'''

    def testBasic(self):
        def check(x):
            self.assertEqual(QtCore.qAbs(x), abs(x))

        check(0)
        check(-10)
        check(10)


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