diff options
Diffstat (limited to 'tests/QtCore/qbytearray_test.py')
-rw-r--r-- | tests/QtCore/qbytearray_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_test.py b/tests/QtCore/qbytearray_test.py index 38ed2ab1c..b12f7f9d5 100644 --- a/tests/QtCore/qbytearray_test.py +++ b/tests/QtCore/qbytearray_test.py @@ -154,6 +154,13 @@ class QByteArrayBug720(unittest.TestCase): self.assertEqual(str(ba), "32\"1\x00123") self.assertEqual(repr(ba), "PySide.QtCore.QByteArray('32\"1\\x00123')") +class QByteArrayImplicitConvert(unittest.TestCase): + def testString(self): + # No implicit conversions from QByteArray to python string + ba = QByteArray("object name") + obj = QObject() + self.assertRaises(TypeError, obj.setObjectName, ba) + if __name__ == '__main__': unittest.main() |