diff options
| author | (no author) <(no author)@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2003-07-02 17:51:01 +0000 |
|---|---|---|
| committer | (no author) <(no author)@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2003-07-02 17:51:01 +0000 |
| commit | edf2f3bec1de42965e347eb808f8604151c35bdb (patch) | |
| tree | 783ec29ed403599a0717019ac974ed2fd7366207 /docutils/test/test_transforms/test_sectnum.py | |
| parent | 97e20d03d7a4f773f24b082b76a34411acc1fefd (diff) | |
| download | docutils-ax.tar.gz | |
This commit was manufactured by cvs2svn to create branch 'ax'.ax
git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/ax@1551 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/test_transforms/test_sectnum.py')
| -rw-r--r-- | docutils/test/test_transforms/test_sectnum.py | 226 |
1 files changed, 0 insertions, 226 deletions
diff --git a/docutils/test/test_transforms/test_sectnum.py b/docutils/test/test_transforms/test_sectnum.py deleted file mode 100644 index 543deac16..000000000 --- a/docutils/test/test_transforms/test_sectnum.py +++ /dev/null @@ -1,226 +0,0 @@ -#! /usr/bin/env python - -# Author: David Goodger, Dmitry Jemerov -# Contact: goodger@users.sourceforge.net -# Revision: $Revision$ -# Date: $Date$ -# Copyright: This module has been placed in the public domain. - -""" -Tests for `docutils.transforms.parts.SectNum` (via -`docutils.transforms.universal.LastReaderPending`). -""" - -from __init__ import DocutilsTestSupport -from docutils.transforms.references import Substitutions -from docutils.parsers.rst import Parser - - -def suite(): - parser = Parser() - s = DocutilsTestSupport.TransformTestSuite(parser) - s.generateTests(totest) - return s - -totest = {} - -totest['section_numbers'] = ((Substitutions,), [ -["""\ -.. sectnum:: - -Title 1 -======= -Paragraph 1. - -Title 2 -------- -Paragraph 2. - -Title 3 -``````` -Paragraph 3. - -Title 4 -------- -Paragraph 4. -""", -u"""\ -<document source="test data"> - <section id="title-1" name="title 1"> - <title auto="1"> - <generated class="sectnum"> - 1\u00a0\u00a0\u00a0 - Title 1 - <paragraph> - Paragraph 1. - <section id="title-2" name="title 2"> - <title auto="1"> - <generated class="sectnum"> - 1.1\u00a0\u00a0\u00a0 - Title 2 - <paragraph> - Paragraph 2. - <section id="title-3" name="title 3"> - <title auto="1"> - <generated class="sectnum"> - 1.1.1\u00a0\u00a0\u00a0 - Title 3 - <paragraph> - Paragraph 3. - <section id="title-4" name="title 4"> - <title auto="1"> - <generated class="sectnum"> - 1.2\u00a0\u00a0\u00a0 - Title 4 - <paragraph> - Paragraph 4. -"""], -["""\ -.. sectnum:: - -**Bold Title** -============== -Paragraph 1. -""", -u"""\ -<document source="test data"> - <section id="bold-title" name="bold title"> - <title auto="1"> - <generated class="sectnum"> - 1\u00a0\u00a0\u00a0 - <strong> - Bold Title - <paragraph> - Paragraph 1. -"""], -["""\ -.. sectnum:: :depth: 2 - -Title 1 -======= -Paragraph 1. - -Title 2 -------- -Paragraph 2. - -Title 3 -``````` -Paragraph 3. - -Title 4 -------- -Paragraph 4. -""", -u"""\ -<document source="test data"> - <section id="title-1" name="title 1"> - <title auto="1"> - <generated class="sectnum"> - 1\u00a0\u00a0\u00a0 - Title 1 - <paragraph> - Paragraph 1. - <section id="title-2" name="title 2"> - <title auto="1"> - <generated class="sectnum"> - 1.1\u00a0\u00a0\u00a0 - Title 2 - <paragraph> - Paragraph 2. - <section id="title-3" name="title 3"> - <title> - Title 3 - <paragraph> - Paragraph 3. - <section id="title-4" name="title 4"> - <title auto="1"> - <generated class="sectnum"> - 1.2\u00a0\u00a0\u00a0 - Title 4 - <paragraph> - Paragraph 4. -"""], -["""\ -.. contents:: -.. sectnum:: :depth: 2 - -Title 1 -======= -Paragraph 1. - -Title 2 -------- -Paragraph 2. - -Title 3 -``````` -Paragraph 3. - -Title 4 -------- -Paragraph 4. -""", -u"""\ -<document source="test data"> - <topic class="contents" id="contents" name="contents"> - <title> - Contents - <bullet_list class="auto-toc"> - <list_item> - <paragraph> - <reference id="id1" refid="title-1"> - <generated class="sectnum"> - 1\u00a0\u00a0\u00a0 - Title 1 - <bullet_list class="auto-toc"> - <list_item> - <paragraph> - <reference id="id2" refid="title-2"> - <generated class="sectnum"> - 1.1\u00a0\u00a0\u00a0 - Title 2 - <bullet_list> - <list_item> - <paragraph> - <reference id="id3" refid="title-3"> - Title 3 - <list_item> - <paragraph> - <reference id="id4" refid="title-4"> - <generated class="sectnum"> - 1.2\u00a0\u00a0\u00a0 - Title 4 - <section id="title-1" name="title 1"> - <title auto="1" refid="id1"> - <generated class="sectnum"> - 1\u00a0\u00a0\u00a0 - Title 1 - <paragraph> - Paragraph 1. - <section id="title-2" name="title 2"> - <title auto="1" refid="id2"> - <generated class="sectnum"> - 1.1\u00a0\u00a0\u00a0 - Title 2 - <paragraph> - Paragraph 2. - <section id="title-3" name="title 3"> - <title refid="id3"> - Title 3 - <paragraph> - Paragraph 3. - <section id="title-4" name="title 4"> - <title auto="1" refid="id4"> - <generated class="sectnum"> - 1.2\u00a0\u00a0\u00a0 - Title 4 - <paragraph> - Paragraph 4. -"""], -]) - - -if __name__ == '__main__': - import unittest - unittest.main(defaultTest='suite') |
