Permalink
Browse files

Fix addm on python 3000. Update docs.

map() in python 3000 returns an iterator object. I completely forgot this when
complaining about 2to3 lieing to me.

Also, in trying to debug the issue, I realized I had not followed
@kennethreitz's advice about adding '..' to sys.path in the base of your tests.
  • Loading branch information...
1 parent 104941d commit 80a4ec0fdb66646f5889544e7e591195e1dd315d @sigmavirus24 committed May 25, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −1 docs
  2. +2 −0 tests/base.py
  3. +1 −1 todo.py
2 docs
Submodule docs updated from 28b062 to 758339
View
@@ -23,6 +23,8 @@
import sys
import unittest
+sys.path.insert(0, '..')
+
import todo
todotxt = todo.CONFIG["TODO_FILE"] = "test_todo.txt"
View
@@ -539,7 +539,7 @@ def addm_todo(args):
else:
lines = concat(args, " ")
lines = lines.split("\n")
- map(add_todo, lines)
+ list(map(add_todo, lines)) # Necessary for python 3000
### End new todo functions

0 comments on commit 80a4ec0

Please sign in to comment.