annotate MoinMoin/formatter/_tests/test_formatter.py @ 3319:2d7693b7caf6

syntax reference was renamed! do same in tests, this breaks docbook
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 19 Mar 2008 02:05:39 +0100
parents 49e9aa06a3da
children 0e3c82dd2109 0c65fd71c7ad
rev   line source
534
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
1 # -*- coding: iso-8859-1 -*-
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
2 """
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
3 MoinMoin - MoinMoin.formatter.* Tests
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
4
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
5 @copyright: 2005 by MoinMoin:AlexanderSchremmer
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
6 @license: GNU GPL, see COPYING for details.
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
7 """
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
8
2175
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
9 import py
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
10
534
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
11 from MoinMoin.Page import Page
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
12 from MoinMoin import wikiutil
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
13
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
14
2243
eca5a27e3eef Changed the formatter test to be py.test style, skip the docbook formatter test.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents: 2175
diff changeset
15 class TestFormatter:
2175
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
16 def testSyntaxReferenceDomXml(self):
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
17 f_name = 'dom_xml'
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
18 try:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
19 formatter = wikiutil.importPlugin(self.request.cfg, "formatter", f_name, "Formatter")
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
20 except wikiutil.PluginAttributeError:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
21 pass
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
22 else:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
23 print "Formatting using %r" % formatter
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
24 self.formatPage("SyntaxReference", formatter)
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
25 print "Done."
2173
789c1a37e4ab don't run docbook formatter test when we have no 4suite installed, add test for non-empty SystemPagesGroup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2164
diff changeset
26
2175
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
27 def testSyntaxReferenceDocBook(self):
3319
2d7693b7caf6 syntax reference was renamed! do same in tests, this breaks docbook
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 3318
diff changeset
28 py.test.skip("docbook is broken")
2173
789c1a37e4ab don't run docbook formatter test when we have no 4suite installed, add test for non-empty SystemPagesGroup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2164
diff changeset
29 try:
789c1a37e4ab don't run docbook formatter test when we have no 4suite installed, add test for non-empty SystemPagesGroup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2164
diff changeset
30 from xml.dom import getDOMImplementation
789c1a37e4ab don't run docbook formatter test when we have no 4suite installed, add test for non-empty SystemPagesGroup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2164
diff changeset
31 dom = getDOMImplementation("4DOM")
789c1a37e4ab don't run docbook formatter test when we have no 4suite installed, add test for non-empty SystemPagesGroup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2164
diff changeset
32 except ImportError:
789c1a37e4ab don't run docbook formatter test when we have no 4suite installed, add test for non-empty SystemPagesGroup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2164
diff changeset
33 # if we don't have 4suite installed, the docbook formatter would just raise an exception
2175
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
34 py.test.skip("not testing docbook formatter because no 4suite installed")
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
35 else:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
36 f_name = 'text_docbook'
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
37 try:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
38 formatter = wikiutil.importPlugin(self.request.cfg, "formatter", f_name, "Formatter")
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
39 except wikiutil.PluginAttributeError:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
40 pass
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
41 else:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
42 print "Formatting using %r" % formatter
3319
2d7693b7caf6 syntax reference was renamed! do same in tests, this breaks docbook
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 3318
diff changeset
43 self.formatPage("HelpOnMoinWikiSyntax", formatter)
2175
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
44 print "Done."
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
45
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
46 def testSyntaxReferenceOthers(self):
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
47 formatters = wikiutil.getPlugins("formatter", self.request.cfg)
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
48
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
49 # we have separate tests for those:
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
50 formatters.remove('text_docbook')
7a3f7ac4f6e0 fix formatter setup for tests, skip broken dom_xml formatter test, add small/big to text_xml formatter (ported from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2173
diff changeset
51 formatters.remove('dom_xml')
2173
789c1a37e4ab don't run docbook formatter test when we have no 4suite installed, add test for non-empty SystemPagesGroup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2164
diff changeset
52
534
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
53 for f_name in formatters:
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
54 try:
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
55 formatter = wikiutil.importPlugin(self.request.cfg, "formatter", f_name, "Formatter")
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
56 except wikiutil.PluginAttributeError:
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
57 pass
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
58 else:
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
59 print "Formatting using %r" % formatter
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
60 self.formatPage("SyntaxReference", formatter)
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
61 print "Done."
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
62
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
63 def formatPage(self, pagename, formatter):
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
64 """Parse a page. Should not raise an exception if the API of the
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
65 formatter is correct.
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
66 """
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
67
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
68 self.request.reset()
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
69 page = Page(self.request, pagename, formatter=formatter)
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
70 self.request.formatter = page.formatter = formatter(self.request)
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
71 #page.formatter.setPage(page)
d827734692ac fix some easy test bugs, disable the severely broken tests
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
72 #page.hilite_re = None
892
9931a09387b0 some whitespace cleanup in the tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 657
diff changeset
73
2164
7fed5edaa2a5 tests: some fixes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2006
diff changeset
74 return self.request.redirectedOutput(page.send_page, content_only=1)
598
ed7033e4cafe revived test_formatter, added some comments to broken dom_xml formatter
tw@waldmann-edv.de
parents: 534
diff changeset
75
2448
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
76
2576
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
77 class TestIdIdempotency:
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
78 def test_sanitize_to_id_idempotent(self):
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
79 def _verify(formatter, id):
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
80 origid = formatter.sanitize_to_id(id)
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
81 id = origid
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
82 for i in xrange(3):
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
83 id = formatter.sanitize_to_id(id)
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
84 assert id == origid
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
85
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
86 formatters = wikiutil.getPlugins("formatter", self.request.cfg)
2580
c3741ed41050 don't test the docbook formatter if there is no 4suite installed
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2576
diff changeset
87 try:
c3741ed41050 don't test the docbook formatter if there is no 4suite installed
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2576
diff changeset
88 from xml.dom import getDOMImplementation
c3741ed41050 don't test the docbook formatter if there is no 4suite installed
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2576
diff changeset
89 dom = getDOMImplementation("4DOM")
c3741ed41050 don't test the docbook formatter if there is no 4suite installed
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2576
diff changeset
90 except ImportError:
c3741ed41050 don't test the docbook formatter if there is no 4suite installed
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2576
diff changeset
91 # if we don't have 4suite installed, the docbook formatter would just raise an exception
c3741ed41050 don't test the docbook formatter if there is no 4suite installed
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2576
diff changeset
92 formatters.remove('text_docbook')
2576
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
93
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
94 testids = [
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
95 r"tho/zeequeen&angu\za",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
96 r"quuirahz\iphohsaij,i",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
97 r"ashuifa+it[ohchieque",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
98 r"ohyie-lakoo`duaghaib",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
99 r"eixaepumuqu[ie\ba|eh",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
100 r"theegieque;zahmeitie",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
101 r"pahcooje&rahkeiz$oez",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
102 r"ohjeeng*iequao%fai?p",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
103 r"ahfoodahmepooquepee;",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
104 r"ubed_aex;ohwebeixah%",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
105 r"eitiekicaejuelae=g^u",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
106 r"",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
107 r' ',
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
108 r'--123',
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
109 r'__$$',
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
110 r'@@',
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
111 u'\xf6\xf6llasdf\xe4',
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
112 ]
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
113
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
114 for f_name in formatters:
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
115 try:
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
116 formatter = wikiutil.importPlugin(self.request.cfg, "formatter",
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
117 f_name, "Formatter")
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
118 f = formatter(self.request)
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
119 for id in testids:
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
120 yield _verify, f, id
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
121 except wikiutil.PluginAttributeError:
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
122 pass
f4c371b00fec refactor the ID generation/writing code
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 2448
diff changeset
123
2448
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
124 coverage_modules = ['MoinMoin.formatter',
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
125 'MoinMoin.formatter.text_html',
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
126 'MoinMoin.formatter.text_gedit',
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
127 'MoinMoin.formatter.text_xml',
3218
32126941c519 Enable syntax reference test for DocBook formatter
Mikko Virkkil? <mvirkkil@cc.hut.fi>
parents: 3213
diff changeset
128 'MoinMoin.formatter.text_docbook',
2448
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
129 'MoinMoin.formatter.text_plain',
3318
49e9aa06a3da dom-xml formatter test works
Johannes Berg <johannes AT sipsolutions DOT net>
parents: 3218
diff changeset
130 'MoinMoin.formatter.dom_xml',
2448
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
131 'MoinMoin.formatter.text_python',
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
132 'MoinMoin.formatter.pagelinks',
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
133 ]
c9949c55ff5e add coverage_modules attribute for coverage testing
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2270
diff changeset
134