diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-03-11 17:42:21 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:03 -0300 |
commit | 945f9bffd9e1b2dd797110c0a1738a3f273bc21f (patch) | |
tree | be18f719c4df3585a76ef23e56b68967831a3ba1 /tests | |
parent | e2121ae09afcc73fffb1af408dca4ce33988dcda (diff) |
Fix bug 718 - "PySide/PyQt4 QByteArray incompatibilities: setNum method"
Fix bug 719 - "PySide/PyQt4 QByteArray incompatibilities: appendByte method"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtCore/qbytearray_test.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_test.py b/tests/QtCore/qbytearray_test.py index fa838c19f..4a600ba31 100644 --- a/tests/QtCore/qbytearray_test.py +++ b/tests/QtCore/qbytearray_test.py @@ -28,6 +28,25 @@ class QByteArrayTestToNumber(unittest.TestCase): self.assertEqual((ctypes.c_double(37.109).value, True), obj.toDouble()) + def testSetNum(self): + b = QByteArray() + b.setNum(-124124L) + self.assertEqual(b, "-124124") + b = QByteArray() + b.setNum(-124124) + self.assertEqual(b, "-124124") + b = QByteArray() + b.setNum(-0.5) + self.assertEqual(b, "-0.5") + + def testAppend(self): + b = QByteArray() + b.append("A") + self.assertEqual(b.size(), 1) + b.append("AB") + self.assertEqual(b.size(), 3) + + class QByteArraySplit(unittest.TestCase): '''Test case for QByteArray.split''' |