Mercurial > hg > TextShaper
comparison tests/test_indent.py @ 31:23616399f36c
make indent a @lines function and test
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Sun, 23 Feb 2014 14:48:40 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 30:ead4d5877b8f | 31:23616399f36c |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 | |
| 3 import os | |
| 4 import unittest | |
| 5 from textshaper.indent import indent | |
| 6 | |
| 7 class TestIndentation(unittest.TestCase): | |
| 8 """test textshaper indentation functionality""" | |
| 9 | |
| 10 def test_indent(self): | |
| 11 text = """The quick brown fox | |
| 12 jumped over | |
| 13 the lazy dog.""" | |
| 14 | |
| 15 self.assertEqual(indent(text, indentation=4), """ The quick brown fox | |
| 16 jumped over | |
| 17 the lazy dog.""") | |
| 18 | |
| 19 if __name__ == '__main__': | |
| 20 unittest.main() |
