All Downloads are FREE. Search and download functionalities are using the official Maven repository.

test.test_parsers.test_rst.test_doctest_blocks.py Maven / Gradle / Ivy

There is a newer version: 2.4
Show newest version
#! /usr/bin/env python

# $Id: test_doctest_blocks.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger 
# Copyright: This module has been placed in the public domain.

"""
Tests for states.py.
"""

from __init__ import DocutilsTestSupport

def suite():
    s = DocutilsTestSupport.ParserTestSuite()
    s.generateTests(totest)
    return s

totest = {}

totest['doctest_blocks'] = [
["""\
Paragraph.

>>> print "Doctest block."
Doctest block.

Paragraph.
""",
"""\

    
        Paragraph.
    
        >>> print "Doctest block."
        Doctest block.
    
        Paragraph.
"""],
["""\
Paragraph.

>>> print "    Indented output."
    Indented output.
""",
"""\

    
        Paragraph.
    
        >>> print "    Indented output."
            Indented output.
"""],
["""\
Paragraph.

    >>> print "    Indented block & output."
        Indented block & output.
""",
"""\

    
        Paragraph.
    
        
            >>> print "    Indented block & output."
                Indented block & output.
"""],
]

if __name__ == '__main__':
    import unittest
    unittest.main(defaultTest='suite')




© 2015 - 2024 Weber Informatics LLC | Privacy Policy