view tests/test_indent.py @ 57:a2bbe406f570 default tip

which is no longer maintained; roll our mediocre own
author Jeff Hammel <k0scist@gmail.com>
date Mon, 20 Feb 2017 10:40:34 -0800
parents 23616399f36c
children
line wrap: on
line source

#!/usr/bin/env python

import os
import unittest
from textshaper.indent import indent

class TestIndentation(unittest.TestCase):
    """test textshaper indentation functionality"""

    def test_indent(self):
        text = """The quick brown fox
  jumped over
    the lazy dog."""

        self.assertEqual(indent(text, indentation=4), """    The quick brown fox
      jumped over
        the lazy dog.""")

if __name__ == '__main__':
    unittest.main()