[Zope3-dev] Error in test testCanonicalPath
Florent Guillaume
fg at nuxeo.com
Wed May 25 09:50:39 EDT 2005
E. Frerich <e.frerich at nord-com.net> wrote:
> 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"?
Probably yes. ValueError is a superclass of UnicodeError in any case.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope3-dev
mailing list