self test cases failed

51 views
Skip to first unread message

roy.q...@gmail.com

unread,
Apr 24, 2013, 4:30:42 AM4/24/13
to mako-d...@googlegroups.com
When I run the self test case by "nosetests -v", I met the below errors,
Could anyone help me to fix it?

======================================================================
ERROR: test_fileargs_implicit (test.test_cache.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python-mako/test/test_cache.py", line 310, in test_fileargs_implicit
    eq_(m.kwargs, {'type':'dbm'})
AttributeError: 'MockCacheImpl' object has no attribute 'kwargs'

======================================================================
ERROR: test_fileargs_lookup (test.test_cache.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python-mako/test/test_cache.py", line 412, in test_fileargs_lookup
    eq_(m.kwargs, {'dir':module_base, 'type':'file'})
AttributeError: 'MockCacheImpl' object has no attribute 'kwargs'

======================================================================
ERROR: test_fileargs_pagetag (test.test_cache.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python-mako/test/test_cache.py", line 363, in test_fileargs_pagetag
    eq_(m.kwargs, {'dir':module_base, 'type':'dbm'})
AttributeError: 'MockCacheImpl' object has no attribute 'kwargs'

======================================================================
FAIL: test_bytestring_passthru (test.test_template.EncodingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python-mako/test/__init__.py", line 95, in maybe
    return fn(*args, **kw)
  File "/opt/python-mako/test/test_template.py", line 389, in test_bytestring_passthru
    self.assertRaises(UnicodeDecodeError, template.render_unicode, name='毛泽东')
AssertionError: UnicodeDecodeError not raised

----------------------------------------------------------------------
Ran 389 tests in 10.227s

FAILED (SKIP=4, errors=3, failures=1)

Michael Bayer

unread,
Apr 24, 2013, 10:53:05 AM4/24/13
to mako-d...@googlegroups.com
seems like installed software is not matched.    You might want to try building an entirely clean virtualenv, installing nose there, and running that against a fresh Mako checkout.



--
You received this message because you are subscribed to the Google Groups "Mako Templates for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mako-discuss...@googlegroups.com.
To post to this group, send email to mako-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/mako-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

roy.q...@gmail.com

unread,
Apr 25, 2013, 3:13:13 AM4/25/13
to mako-d...@googlegroups.com


On Wednesday, April 24, 2013 10:53:05 PM UTC+8, Michael Bayer wrote:
seems like installed software is not matched.    You might want to try building an entirely clean virtualenv, installing nose there, and running that against a fresh Mako checkout.

Thanks for your reply, my Mako version is 0.8.0, and nose is 1.3.0, it still does not work.
if I add a write action after _install_mock_cache(like in test_cache.py 303), the test can pass the test, why?

        m = self._install_mock_cache(l.get_template('test'))
 +       f = open("/tmp/aaa.txt", "a")
 +       f.write(l.get_template('test').render())
 +       f.close()
 

Michael Bayer

unread,
Apr 25, 2013, 10:07:03 AM4/25/13
to mako-d...@googlegroups.com
I really couldn't say, the unit tests pass here just fine as well as on our jenkins server.
Reply all
Reply to author
Forward
0 new messages