Description of problem: Opened and ran a python unit test using the PyDev unittest run configuration. Version-Release number of selected component: eclipse-pydev-2.7.1-6.fc17 Additional info: cmdline: /usr/bin/python2.7 -u /usr/share/eclipse/dropins/pydev/eclipse/plugins/org.python.pydev_2.7.1.2012100913/pysrc/runfiles.py /home/BSipos/workspace/nbnco_roo/trunk/roo-snmp/test/MockRooServices.py --port 52994 --verbosity 0 core_backtrace: b57b3fc97f44bfab7cc13cc33eb238a048a079b9 0x24a msg_reply_handler /usr/lib/python2.7/site-packages/dbus/connection.py - dso_list: dbus-python-0.83.0-9.fc17.x86_64 executable: /usr/share/eclipse/dropins/pydev/eclipse/plugins/org.python.pydev_2.7.1.2012100913/pysrc/runfiles.py kernel: 3.7.9-101.fc17.x86_64 uid: 500 Truncated backtrace: connection.py:586:msg_reply_handler:TypeError: _introspect_reply_handler() takes exactly 2 arguments (1 given) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 586, in msg_reply_handler reply_handler(*message.get_args_list(**get_args_opts)) TypeError: _introspect_reply_handler() takes exactly 2 arguments (1 given) Local variables in innermost frame: reply_handler: <bound method ProxyObject._introspect_reply_handler of <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0x2876470> :1.638 /com/rkf_eng/roo/AlarmLog at 0x29f1690>> message: <dbus.lowlevel.MethodReturnMessage object at 0x7fe1f4017a68> get_args_opts: {'byte_arrays': False, 'utf8_strings': True} error_handler: <bound method ProxyObject._introspect_error_handler of <ProxyObject wrapping <dbus._dbus.SessionBus (session) at 0x2876470> :1.638 /com/rkf_eng/roo/AlarmLog at 0x29f1690>>
Created attachment 706743 [details] File: backtrace
Created attachment 706744 [details] File: environ
Created attachment 706745 [details] File: smolt_data
Sami please investigate
I am looking into this. Even just 'import unittest' does not seem to be found. I'll figure out why.
Hi Brian, I was not able to reproduce this. I created a new PyDev project; created a test cause using the following code: import random import unittest class TestSequenceFunctions(unittest.TestCase): def setUp(self): self.seq = range(10) def test_shuffle(self): # make sure the shuffled sequence does not lose any elements random.shuffle(self.seq) self.seq.sort() self.assertEqual(self.seq, range(10)) # should raise an exception for an immutable sequence self.assertRaises(TypeError, random.shuffle, (1,2,3)) def test_choice(self): element = random.choice(self.seq) self.assertTrue(element in self.seq) def test_sample(self): with self.assertRaises(ValueError): random.sample(self.seq, 20) for element in random.sample(self.seq, 5): self.assertTrue(element in self.seq) if __name__ == '__main__': unittest.main() ran it by right-clicking on the test file and selecting Run->"Python unit-test" and it ran successfully. Are you able to reproduce this consistently ? Can you attach a project or a test case that causes the crash for you ?
I forgot to add to the original submission, but the crash I saw was after the test itself raised an exception. It seemed that a use of dbus-python within a test raised an exception and the PyDev runner didn't intercept it. A dumb example would be: def test_error(self): raise Exception("failed")
Hmm... I can seem to be able to reproduce it. This is the test I am using: import unittest class Test(unittest.TestCase): def test_error(self): raise Exception("failed") I run it as unit-test and I get a proper failure in the PyUnit view. Is there a missing detail perhaps
No response from reporter for few months. Closing, please reopne when you have the time to help us.