{"issue":{"created_at":"2011-12-14T15:57:02Z","state":"open","updated_at":"2011-12-14T15:57:08Z","comments":9,"user":{"gravatar_id":"86e49052bd9a5fb3eabfd7368b68bbb7","id":34519,"url":"https://api.github.com/users/jpellerin","login":"jpellerin","avatar_url":"https://secure.gravatar.com/avatar/86e49052bd9a5fb3eabfd7368b68bbb7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"<b>What steps will reproduce the problem?</b>\n1. Add an error to a package setup / teardown. Example:\n\n# __init__.py:\ndef setupPackage():\n        foo=open (\"some_file_that_doesn't_exist\", \"r\")\n# some_test.py:\ndef test():\n        pass\n\n2. Execute the testcase:\nnosetests some_test.py\n\n<b>What is the expected output? What do you see instead?</b>\n- An error related to the actual problem experienced when setting up the\npackage / module.\n- A confusing Python exception:\n\n[garrcoop@nova-nurburgring test_int2]$ nosetests some_test.py\nTraceback (most recent call last):\n  File \"/auto/nova/tools/latest/bin/nosetests\", line 5, in ?\n    main()\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/core.py\",\nline 219, in __init__\n    argv=argv, testRunner=testRunner, testLoader=testLoader)\n  File \"/nfs/nova/packages/i386/python/2.4.5/lib/python2.4/unittest.py\",\nline 759, in __init__\n    self.runTests()\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/core.py\",\nline 298, in runTests\n    result = self.testRunner.run(self.test)\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/core.py\",\nline 62, in run\n    test(result)\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/suite.py\",\nline 132, in __call__\n    return self.run(*arg, **kw)\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/suite.py\",\nline 152, in run\n    result.addError(self, self.exc_info())\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/proxy.py\",\nline 126, in addError\n    plugins.addError(self.test, err)\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/plugins/manager.py\",\nline 81, in __call__\n    return self.call(*arg, **kw)\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/plugins/manager.py\",\nline 145, in simple\n    result = meth(*arg, **kw)\n  File\n\"/ws/garrcoop/tools/python-2.4.5/i386-redhat-linux/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/plugins/manager.py\",\nline 301, in addError\n    return self.plugin.addError(test.test, err, capt)\nAttributeError: 'ContextSuite' object has no attribute 'test'\n\n<b>What version of the product are you using? On what operating system?</b>\n\nVersion: 0.10.3.\nOS Version:\n[garrcoop@nova-nurburgring test_int2]$ uname -a\nLinux nova-nurburgring 2.6.9-67.0.7.ELsmp #1 SMP Wed Feb 27 04:48:20 EST\n2008 i686 i686 i386 GNU/Linux\n[garrcoop@nova-nurburgring test_int2]$ head -n 1 /etc/issue\nRed Hat Enterprise Linux AS release 4 (Nahant Update 6)\n\n<b>Please provide any additional information below.</b>\n\nWe have 2 custom plugins provided for nosetests, but this issue is\noccurring with --with-isolation as well as without.\n\nI've seen this issue occur when raising an IOError, TypeErrors, and a\nvariety of different errors, so maybe the problem is that fact that only\nExceptions are being caught and handled properly, not errors?\n\nInserting the following line in nose.proxy at line 120 helps identify the\nactual issue:\n\n        print \"DEBUG:\",self.test,\"ERROR:\",err,\"TYPE:\",type(err)\n\nInterestingly enough this doesn't occur on a FreeBSD system with a vanilla\nnosetests 0.10.4 installed.\n\nGoogle Code Info:\nIssue #: 217\nAuthor: yaneg...@gmail.com\nCreated On: 2008-11-03T02:28:44.000Z\nClosed On: ","assignee":{"gravatar_id":"86e49052bd9a5fb3eabfd7368b68bbb7","id":34519,"url":"https://api.github.com/users/jpellerin","login":"jpellerin","avatar_url":"https://secure.gravatar.com/avatar/86e49052bd9a5fb3eabfd7368b68bbb7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2553276,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":48,"title":"Confusing output encountered on 10.3 with Python 2.4.5 when exception caught in ","html_url":"https://github.com/nose-devs/nose/issues/48","closed_at":null,"url":"https://api.github.com/repos/nose-devs/nose/issues/48","milestone":null},"action":"created","comment":{"created_at":"2011-12-14T15:57:08Z","updated_at":"2011-12-14T15:57:08Z","user":{"gravatar_id":"86e49052bd9a5fb3eabfd7368b68bbb7","id":34519,"url":"https://api.github.com/users/jpellerin","login":"jpellerin","avatar_url":"https://secure.gravatar.com/avatar/86e49052bd9a5fb3eabfd7368b68bbb7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"We just encountered this issue too.  The problem is that ZeroNinePlugin makes too\nmany assumptions about the 'test' argument.\n\nFor one, it assumes that it's a Test case, where it can sometimes be a ContextSuite,\nwhich does not have .test or .tbinfo attributes.  It also assumes that the test will\nhave a .capturedOutput attribute, which is not true if nosetests is run with the \"-s\"\noption.\n\nI guess this would be a good reason to just update the plugin to the newer API.  But\nthe ZeroNinePlugin is pretty nifty, and would work fine if these minor issues were fixed.\n\nGoogle Code Info:\nAuthor: hyugaric...@gmail.com\nCreated On: 2009-10-01T16:24:52.000Z","id":3141735,"url":"https://api.github.com/repos/nose-devs/nose/issues/comments/3141735"}}