diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-10-01 13:23:04 -0300 |
---|---|---|
committer | Lauro Neto <lauro.neto@openbossa.org> | 2010-10-01 13:37:43 -0300 |
commit | 288a53369fa8df74a92c7517e8744c5139797c78 (patch) | |
tree | 19d011db4e6840cbedc6197a04788f26f8179caa | |
parent | 7633675d1154eda8d799aa340c5513baa34621b9 (diff) |
Removing deprecated and duplicated test
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
-rw-r--r-- | tests/signals/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/signals/segfault_proxyparent_test.py | 14 | ||||
-rw-r--r-- | tests/signals/upstream_segfault_test.py | 64 |
3 files changed, 0 insertions, 79 deletions
diff --git a/tests/signals/CMakeLists.txt b/tests/signals/CMakeLists.txt index eaa9a84d1..9aafe75e9 100644 --- a/tests/signals/CMakeLists.txt +++ b/tests/signals/CMakeLists.txt @@ -34,4 +34,3 @@ PYSIDE_TEST(signal_signature_test.py) PYSIDE_TEST(signal_with_primitive_type_test.py) PYSIDE_TEST(slot_reference_count_test.py) PYSIDE_TEST(static_metaobject_test.py) -PYSIDE_TEST(upstream_segfault_test.py) diff --git a/tests/signals/segfault_proxyparent_test.py b/tests/signals/segfault_proxyparent_test.py index 2b41f67c4..791e19cb2 100644 --- a/tests/signals/segfault_proxyparent_test.py +++ b/tests/signals/segfault_proxyparent_test.py @@ -54,20 +54,6 @@ class SegfaultCase(unittest.TestCase): self.assert_(self.called) - def testSameReference(self): - """Example of how sip(?) reuses memory positions""" - obj = Dummy() - s1 = str(obj) - del obj - obj = Dummy() - s2 = str(obj) - self.assertEqual(s1, s2) - - obj2 = Dummy() - s3 = str(obj2) - self.assertNotEqual(s2, s3) - - if __name__ == '__main__': unittest.main() diff --git a/tests/signals/upstream_segfault_test.py b/tests/signals/upstream_segfault_test.py deleted file mode 100644 index 793b04b1c..000000000 --- a/tests/signals/upstream_segfault_test.py +++ /dev/null @@ -1,64 +0,0 @@ - -import unittest - -from PySide.QtCore import QObject, SIGNAL, SLOT - -# Upstream version of segfault_test - -class Dummy(QObject): - def __init__(self, parent=None): - QObject.__init__(self, parent) - -class Joe(QObject): - def __init__(self, parent=None): - QObject.__init__(self, parent) - -class SegfaultCase(unittest.TestCase): - """Test case for the segfault happening when parent() is called inside - ProxyObject""" - - def setUp(self): - self.called = False - - def tearDown(self): - try: - del self.args - except: - pass - - def callback(self, *args): - if tuple(self.args) == args: - self.called = True - - def testSegfault(self): - obj = Dummy() - QObject.connect(obj, SIGNAL('bar(int)'), self.callback) - self.args = (33,) - obj.emit(SIGNAL('bar(int)'), self.args[0]) - self.assert_(self.called) - - del obj - obj = Joe() - QObject.connect(obj, SIGNAL('bar(int)'), self.callback) - self.args = (33,) - obj.emit(SIGNAL('bar(int)'), self.args[0]) - self.assert_(self.called) - - - def testSameReference(self): - """Example of how sip reuses an already used PyObject""" - obj = Dummy() - s1 = str(obj) - del obj - obj = Dummy() - s2 = str(obj) - self.assertEqual(s1, s2) - - obj2 = Dummy() - s3 = str(obj2) - self.assertNotEqual(s2, s3) - - -if __name__ == '__main__': - unittest.main() - |