Ariane Paola
unread,Jun 4, 2008, 1:44:21 PM6/4/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nose-dev
Hello, my name is Ariane.
I am working on TurboGears on Jython during this Google Summer of
Code.
Running unittest for nose to use it with Pylons (Jython trunk) I did
get the following error:
The patch is further below, which helps to pass all tests on Jython
trunk.
test_try_run (test_utils.TestUtils) ... ok
======================================================================
ERROR: test_setup_nosetests_command_works (test_commands.TestCommands)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ariane/work/jython-svn/dist/Lib/unittest.py", line 229,
in __call__
testMethod()
File "/home/ariane/work/nose/functional_tests/test_commands.py",
line 41, in test_setup_nosetests_command_works
self.assertFalse(e.args[0], buf.getvalue())
AttributeError: 'TestCommands' object has no attribute 'assertFalse'
-------------------- >> begin captured stdout << ---------------------
/home/ariane/work/nose
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
writing top-level names to UNKNOWN.egg-info/top_level.txt
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
running build_ext
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 253 tests in 15.191s
FAILED (errors=1)
---
Index: functional_tests/test_commands.py
===================================================================
--- functional_tests/test_commands.py (revision 504)
+++ functional_tests/test_commands.py (working copy)
@@ -8,7 +8,11 @@
support = os.path.join(
os.path.dirname(__file__), 'support', 'issue191')
+# Jython compatibility (CPython 2.2)
+if not hasattr(unittest.TestCase, 'assertFalse'):
+ unittest.TestCase.assertFalse = unittest.TestCase.failIf
+
class TestCommands(unittest.TestCase):
def setUp(self):
try:
Regards,
Ariane Paola