~ubuntu-branches/ubuntu/maverick/sphinx/maverick

« back to all changes in this revision

Viewing changes to tests/test_markup.py

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-04-01 21:49:50 UTC
  • mfrom: (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090401214950-7cgccot2ouoi9452
Tags: 0.5.2-1ubuntu1
* Merge from debian unstable (LP: #353422):
  - debian/rules: instead of adding --install-layout=deb to setup.py install:
    + Include /usr/share/python/python.mk.
    + Add py_setup_install_args to setup.py install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
    Test various Sphinx-specific markup extensions.
7
7
 
8
 
    :copyright: 2008 by Georg Brandl.
9
 
    :license: BSD.
 
8
    :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
 
9
    :license: BSD, see LICENSE for details.
10
10
"""
11
11
 
12
12
import re
23
23
def setup_module():
24
24
    global app, settings, parser
25
25
    app = TestApp(cleanenv=True)
26
 
    optparser = frontend.OptionParser(components=(rst.Parser, HTMLWriter, LaTeXWriter))
 
26
    optparser = frontend.OptionParser(
 
27
        components=(rst.Parser, HTMLWriter, LaTeXWriter))
27
28
    settings = optparser.get_default_values()
28
29
    settings.env = app.builder.env
29
30
    parser = rst.Parser()
47
48
 
48
49
def verify_re(rst, html_expected, latex_expected):
49
50
    document = utils.new_document('test data', settings)
 
51
    document['file'] = 'dummy'
50
52
    parser.parse(rst, document)
51
53
    for msg in document.traverse(nodes.system_message):
52
54
        if msg['level'] == 1: