#! /usr/bin/env python # $Id: test_inline_markup.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger # Copyright: This module has been placed in the public domain. """ Tests for inline markup in PEPs (readers/pep.py). """ from .__init__ import DocutilsTestSupport def suite(): s = DocutilsTestSupport.PEPParserTestSuite() s.generateTests(totest) return s totest = {} totest['standalone_references'] = [ ["""\ See PEP 287 (pep-0287.txt), and RFC 2822 (which obsoletes RFC822 and RFC-733). """, """\ See \n\ PEP 287 ( pep-0287.txt ), and \n\ RFC 2822 (which obsoletes \n\ RFC822 and \n\ RFC-733 ). """], ["""\ References split across lines: PEP 287 RFC 2822 """, """\ References split across lines: PEP 287 RFC 2822 """], ["""\ Test PEP-specific implicit references before a URL: PEP 287 (http://www.python.org/dev/peps/pep-0287), RFC 2822. """, """\ Test PEP-specific implicit references before a URL: PEP 287 ( http://www.python.org/dev/peps/pep-0287 ), \n\ RFC 2822 . """], ] totest['miscellaneous'] = [ ["""\ For *completeness*, _`let's` ``test`` **other** forms_ |of| `inline markup` [*]_. .. [*] See http://docutils.sf.net/docs/ref/rst/restructuredtext.html. """, """\ For \n\ completeness , \n\ let's \n\ test \n\ other \n\ forms \n\ of \n\ inline markup \n\ . See \n\ http://docutils.sf.net/docs/ref/rst/restructuredtext.html . """], ] if __name__ == '__main__': import unittest unittest.main(defaultTest='suite')