This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
from nose.plugins.attrib import attr | |
from nose.plugins.skip import SkipTest | |
def fail(message): | |
raise AssertionError(message) | |
def wip(f): | |
@wraps(f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import contextlib | |
import datetime | |
@contextlib.contextmanager | |
def mock_now(dt_value): | |
"""Context manager for mocking out datetime.now() in unit tests. | |
Example: | |
with mock_now(datetime.datetime(2011, 2, 3, 10, 11)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILES=*.rst | |
for f in $FILES | |
do | |
filename="${f%.*}" | |
echo "Converting $f to $filename.md" | |
`pandoc $f -f rst -t markdown -o $filename.md` | |
done |