aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-05 18:10:23 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-06 19:11:11 -0300
commita5b2237ee0a7a894e1eac4e2c0f4b270866a059a (patch)
tree22ced4e4a694f8ed9477fba2062e11806f3c2e7f /tests
parent826678cb91124784339c2a92118e82413ef03b5c (diff)
None is convertible to QString, the result is a QString where QString.isNull is true.
Diffstat (limited to 'tests')
-rw-r--r--tests/qtcore/qobject_test.py6
-rw-r--r--tests/qtcore/qstring_test.py4
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/qtcore/qobject_test.py b/tests/qtcore/qobject_test.py
index 848cce361..a1749babc 100644
--- a/tests/qtcore/qobject_test.py
+++ b/tests/qtcore/qobject_test.py
@@ -25,12 +25,6 @@ class ObjectNameCase(unittest.TestCase):
self.assertEqual(name, obj.objectName())
- def testNone(self):
- #QObject.objectName(None)
- obj = QObject()
-
- self.assertRaises(TypeError, obj.setObjectName, None)
-
def testDefault(self):
#QObject.objectName() default
obj = QObject()
diff --git a/tests/qtcore/qstring_test.py b/tests/qtcore/qstring_test.py
index 193ef0910..9bb68a3ed 100644
--- a/tests/qtcore/qstring_test.py
+++ b/tests/qtcore/qstring_test.py
@@ -105,6 +105,10 @@ class QStringConstructor(unittest.TestCase):
self.assertEqual(obj1, obj2)
+ def testNullQString(self):
+ s = QString(None)
+ self.assertTrue(s.isNull())
+
def testQStringFromPy(self):
#QString(const char*)
sample = 'a new string'