summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDasIch <dasdasich@gmail.com>2010-08-10 15:22:11 +0200
committerDasIch <dasdasich@gmail.com>2010-08-10 15:22:11 +0200
commit9ae387d9fdcb4bdaf1dd44217d0d8fdd9f965ede (patch)
tree1233b6df35b657d84fe4f964a954435a8b519533
parentc03634e844d7d507bb5fc3796099b70680212daf (diff)
downloadsphinx-9ae387d9fdcb4bdaf1dd44217d0d8fdd9f965ede.tar.gz
Fixed algorithm test_insert passes now and everything seems to be working fine
-rw-r--r--sphinx/versioning.py4
-rw-r--r--tests/test_versioning.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/sphinx/versioning.py b/sphinx/versioning.py
index 9ba7e3f7..5806e971 100644
--- a/sphinx/versioning.py
+++ b/sphinx/versioning.py
@@ -67,8 +67,8 @@ def merge_doctrees(old, new, condition):
continue
if not merge_node(old_node, new_node):
if old_nodes:
- for i, old_node in enumerate(old_nodes):
- if merge_node(old_node, new_node):
+ for i, very_old_node in enumerate(old_nodes):
+ if merge_node(very_old_node, new_node):
del old_nodes[i]
# If the last identified node which has not matched the
# unidentified node matches the current one, we have to
diff --git a/tests/test_versioning.py b/tests/test_versioning.py
index 19ef8904..47c322bb 100644
--- a/tests/test_versioning.py
+++ b/tests/test_versioning.py
@@ -78,8 +78,6 @@ def test_deleted_end():
assert original_uids[:-1] == uids
def test_insert():
- from nose import SkipTest
- raise SkipTest('The algorithm does not work at the moment')
insert = doctrees['versioning/insert']
new_nodes = list(merge_doctrees(original, insert, is_paragraph))
uids = [n.uid for n in insert.traverse(is_paragraph)]