<commit_before>from PySide.QtCore import QTimer, QObject
import sys
import unittest

class TestDestroySignal(unittest.TestCase):
    def onObjectDestroyed(self, timer):
        self.assert_(isinstance(timer, QTimer))
        self._destroyed = True

    def testSignal(self):
        self._destroyed = False
        t = QTimer()
        t.destroyed[QObject].connect(self.onObjectDestroyed)
        del t
        self.assert_(self._destroyed)

    def testWithParent(self):<commit_msg>Fixed test case, when the destroyed() signal is emitted all C++ objects are just QObject because their up destructors were already called.<commit_after>from PySide.QtCore import QTimer, QObject
import sys
import unittest

class TestDestroySignal(unittest.TestCase):
    def onObjectDestroyed(self, timer):
        self.assert_(isinstance(timer, QObject))
        self._destroyed = True

    def testSignal(self):
        self._destroyed = False
        t = QTimer()
        t.destroyed[QObject].connect(self.onObjectDestroyed)
        del t
        self.assert_(self._destroyed)

    def testWithParent(self):
{'fraction_non_alphanumeric': 0.08424908424908426, 'fraction_numerical': 0.0, 'mean_word_length': 3.389558232931727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4022060', 'n_tokens_mistral': 310, 'n_tokens_neox': 304, 'n_words': 80}