Commit 03d1d69b authored by Casey Duncan's avatar Casey Duncan

Remove unused local assignment

Add test for upward traversal
parent d131f572
......@@ -122,6 +122,9 @@ Zope Changes
Bugs fixed
- unrestrictedTraverse() refactored to remove hasattr calls (which mask
conflict errors) and for greater readability and maintainability.
- Zope can now be embedded in C/C++ without exceptions being raised
in zdoptions.
......
......@@ -127,7 +127,6 @@ class Traversable:
return self
_getattr = getattr
_hasattr = hasattr
_none = None
marker = _marker
......
......@@ -256,6 +256,12 @@ class TestTraverse( unittest.TestCase ):
self.assertEqual(
self.root.restrictedTraverse('happy/happy', 'joy'), 'joy')
def testTraverseUp(self):
# Test that we can traverse upwards
self.failUnless(
aq_base(self.root.folder1.file.restrictedTraverse('../..')) is
aq_base(self.root))
def test_suite():
suite = unittest.TestSuite()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment