summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-02-15 16:37:16 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:53:58 -0300
commitf8482e43947d2e0f218db70deae26186077899e5 (patch)
treeed1e7c06c16ab6b7ad4bc63a97a97970a54a54ba
parent719b8f40e337edf57c6993c725ab5e71e329bc58 (diff)
Add unit test for bug 684.
-rw-r--r--tests/signals/signal_emission_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/signals/signal_emission_test.py b/tests/signals/signal_emission_test.py
index a8dd4fdc..44bfd902 100644
--- a/tests/signals/signal_emission_test.py
+++ b/tests/signals/signal_emission_test.py
@@ -107,5 +107,18 @@ class EmitUnknownType(UsesQCoreApplication):
a.connect(SIGNAL('foobar(Dummy)'), lambda x: 42) # Just connect with an unknown type
self.assertRaises(TypeError, a.emit, SIGNAL('foobar(Dummy)'), 22)
+class EmitEnum(UsesQCoreApplication):
+ """Test emission of enum arguments"""
+
+ def slot(self, arg):
+ self.arg = arg
+
+ def testIt(self):
+ self.arg = None
+ p = QProcess()
+ p.stateChanged.connect(self.slot)
+ p.stateChanged.emit(QProcess.NotRunning)
+ self.assertEqual(self.arg, QProcess.NotRunning)
+
if __name__ == '__main__':
unittest.main()