[Zope3-dev] Error in test testCanonicalPath

E. Frerich e.frerich at nord-com.net
Tue May 24 12:47:10 EDT 2005


Hello,

the unit tests tell me
"
Error in test testCanonicalPath (zope.app.traversing.tests.test_conveniencefunct
ions.Test)
Traceback (most recent call last):
  File "C:\ZopeSubversion\Z3_SSH-2\src\zope\app\traversing\tests\test_convenienc
efunctions.py", line 262, in testCanonicalPath
    self.assertRaises(error_type, canonicalPath, value)
  File "c:\programme\python23\lib\unittest.py", line 289, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "C:\ZopeSubversion\Z3_SSH-2\src\zope\app\traversing\api.py", line 238, in
 canonicalPath
    raise ValueError('canonical path must start with a "/": %s' % path)
ValueError: canonical path must start with a "/": ú23
"

The docstring in function canonicalPath is
    """Returns a canonical absolute unicode path for the given path or object.

    Resolves segments that are '.' or '..'.

    Raises ValueError if a badly formed path is given.
    """

The definition of bad locations in the test program begins:
        _bad_locations = (
            (UnicodeError, '\xa323'),

Should "UnicodeError" be changed into "ValueError"?

Egon


More information about the Zope3-dev mailing list