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>2011-02-15 16:37:16 -0200
commit0ad9c484dff7a3985f733d61ef0d47e7e34ac69b (patch)
tree332acb2749f38755eee80206d54368420e7198e6
parent0298a342892684f9832fb840574d30e254360e5c (diff)
downloadpyside-0ad9c484dff7a3985f733d61ef0d47e7e34ac69b.tar.gz
pyside-0ad9c484dff7a3985f733d61ef0d47e7e34ac69b.tar.xz
pyside-0ad9c484dff7a3985f733d61ef0d47e7e34ac69b.zip
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 a8dd4fd..44bfd90 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()