Skip to content

Commit

Permalink
Add comment_copyright doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
cayennes committed May 14, 2012
1 parent 6a6c498 commit 0a2f5b5
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion kanji_colorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,29 @@ def resize_svg(svg):
return svg

def comment_copyright(svg):
"Add a comment about what this script has done to the copyright notice"
"""
Add a comment about what this script has done to the copyright notice
>>> svg = '''<!--
... Copyright (C) copyright holder (etc.)
... -->
... <svg> <! content> </svg>
... '''
This contains the notice:
>>> comment_copyright(svg).count('This file has been modified')
1
And depends on the settings it is run with:
>>> config['mode'] = 'contrast'
>>> comment_copyright(svg).count('contrast')
1
>>> config['mode'] = 'spectrum'
>>> comment_copyright(svg).count('contrast')
0
"""
note = """This file has been modified from the original version by the kanji_colorize.py
script (available at http://github.com/cayennes/kanji-colorize) with these
settings:
Expand Down

0 comments on commit 0a2f5b5

Please sign in to comment.