annotate markup/tests/template.py @ 36:ed370ebfa794 trunk

Fix for #7: match templates no longer process their own output.
author cmlenz
date Sun, 02 Jul 2006 22:39:03 +0000
parents b4f78c05e5c9
children 37557b8fb925
rev   line source
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
1 # -*- coding: utf-8 -*-
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
2 #
27
b4f78c05e5c9 * Fix the boilerplate in the Python source files.
cmlenz
parents: 21
diff changeset
3 # Copyright (C) 2006 Christopher Lenz
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
4 # All rights reserved.
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
5 #
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
6 # This software is licensed as described in the file COPYING, which
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
7 # you should have received as part of this distribution. The terms
27
b4f78c05e5c9 * Fix the boilerplate in the Python source files.
cmlenz
parents: 21
diff changeset
8 # are also available at http://markup.cmlenz.net/wiki/License.
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
9 #
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
10 # This software consists of voluntary contributions made by many
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
11 # individuals. For the exact contribution history, see the revision
27
b4f78c05e5c9 * Fix the boilerplate in the Python source files.
cmlenz
parents: 21
diff changeset
12 # history and logs, available at http://markup.cmlenz.net/log/.
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
13
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
14 import doctest
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
15 import unittest
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
16 import sys
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
17
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
18 from markup.core import Stream
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
19 from markup.template import BadDirectiveError, Context, Template, \
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
20 TemplateSyntaxError
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
21
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
22
36
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
23 class MatchDirectiveTestCase(unittest.TestCase):
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
24 """Tests for the `py:match` template directive."""
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
25
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
26 def test_without_strip(self):
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
27 """
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
28 Verify that a match template can produce the same kind of element that
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
29 it matched without entering an infinite recursion.
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
30 """
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
31 tmpl = Template('''<doc xmlns:py="http://purl.org/kid/ns#">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
32 <elem py:match="elem">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
33 <div class="elem">${select('*/text()')}</div>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
34 </elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
35 <elem>Hey Joe</elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
36 </doc>''')
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
37 self.assertEqual("""<doc>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
38 <elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
39 <div class="elem">Hey Joe</div>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
40 </elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
41 </doc>""", str(tmpl.generate()))
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
42
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
43 def test_recursive_match_1(self):
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
44 """
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
45 Match directives are applied recursively, meaning that they are also
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
46 applied to any content they may have produced themselves:
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
47 """
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
48 tmpl = Template('''<doc xmlns:py="http://purl.org/kid/ns#">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
49 <elem py:match="elem">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
50 <div class="elem">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
51 ${select('*/*')}
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
52 </div>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
53 </elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
54 <elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
55 <subelem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
56 <elem/>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
57 </subelem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
58 </elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
59 </doc>''')
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
60 self.assertEqual("""<doc>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
61 <elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
62 <div class="elem">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
63 <subelem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
64 <elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
65 <div class="elem">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
66 </div>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
67 </elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
68 </subelem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
69 </div>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
70 </elem>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
71 </doc>""", str(tmpl.generate()))
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
72
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
73 def test_recursive_match_2(self):
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
74 """
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
75 When two or more match templates match the same element and also
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
76 themselves output the element they match, avoiding recursion is even
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
77 more complex, but should work.
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
78 """
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
79 tmpl = Template('''<html xmlns:py="http://purl.org/kid/ns#">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
80 <body py:match="body">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
81 <div id="header"/>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
82 ${select('*/*')}
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
83 </body>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
84 <body py:match="body">
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
85 ${select('*/*')}
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
86 <div id="footer"/>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
87 </body>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
88 <body>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
89 <h1>Foo</h1>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
90 </body>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
91 </html>''')
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
92 self.assertEqual("""<html>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
93 <body>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
94 <div id="header"/><h1>Foo</h1>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
95 <div id="footer"/>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
96 </body>
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
97 </html>""", str(tmpl.generate()))
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
98
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
99
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
100 class TemplateTestCase(unittest.TestCase):
36
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
101 """Tests for basic template processing, expression evaluation and error
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
102 reporting.
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
103 """
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
104
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
105 def test_interpolate_string(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
106 parts = list(Template._interpolate('bla'))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
107 self.assertEqual(1, len(parts))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
108 self.assertEqual(Stream.TEXT, parts[0][0])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
109 self.assertEqual('bla', parts[0][1])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
110
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
111 def test_interpolate_simple(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
112 parts = list(Template._interpolate('${bla}'))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
113 self.assertEqual(1, len(parts))
10
f77f7a91aa46 Moved the template-specific stream event kinds into the template module.
cmlenz
parents: 1
diff changeset
114 self.assertEqual(Template.EXPR, parts[0][0])
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
115 self.assertEqual('bla', parts[0][1].source)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
116
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
117 def test_interpolate_escaped(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
118 parts = list(Template._interpolate('$${bla}'))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
119 self.assertEqual(1, len(parts))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
120 self.assertEqual(Stream.TEXT, parts[0][0])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
121 self.assertEqual('${bla}', parts[0][1])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
122
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
123 def test_interpolate_short(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
124 parts = list(Template._interpolate('$bla'))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
125 self.assertEqual(1, len(parts))
10
f77f7a91aa46 Moved the template-specific stream event kinds into the template module.
cmlenz
parents: 1
diff changeset
126 self.assertEqual(Template.EXPR, parts[0][0])
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
127 self.assertEqual('bla', parts[0][1].source)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
128
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
129 def test_interpolate_mixed1(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
130 parts = list(Template._interpolate('$foo bar $baz'))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
131 self.assertEqual(3, len(parts))
10
f77f7a91aa46 Moved the template-specific stream event kinds into the template module.
cmlenz
parents: 1
diff changeset
132 self.assertEqual(Template.EXPR, parts[0][0])
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
133 self.assertEqual('foo', parts[0][1].source)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
134 self.assertEqual(Stream.TEXT, parts[1][0])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
135 self.assertEqual(' bar ', parts[1][1])
10
f77f7a91aa46 Moved the template-specific stream event kinds into the template module.
cmlenz
parents: 1
diff changeset
136 self.assertEqual(Template.EXPR, parts[2][0])
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
137 self.assertEqual('baz', parts[2][1].source)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
138
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
139 def test_interpolate_mixed2(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
140 parts = list(Template._interpolate('foo $bar baz'))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
141 self.assertEqual(3, len(parts))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
142 self.assertEqual(Stream.TEXT, parts[0][0])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
143 self.assertEqual('foo ', parts[0][1])
10
f77f7a91aa46 Moved the template-specific stream event kinds into the template module.
cmlenz
parents: 1
diff changeset
144 self.assertEqual(Template.EXPR, parts[1][0])
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
145 self.assertEqual('bar', parts[1][1].source)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
146 self.assertEqual(Stream.TEXT, parts[2][0])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
147 self.assertEqual(' baz', parts[2][1])
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
148
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
149 def test_bad_directive_error(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
150 xml = '<p xmlns:py="http://purl.org/kid/ns#" py:do="nothing" />'
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
151 try:
21
b4d17897d053 * Include paths are now interpreted relative to the path of the including template. Closes #3.
cmlenz
parents: 10
diff changeset
152 tmpl = Template(xml, filename='test.html')
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
153 except BadDirectiveError, e:
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
154 self.assertEqual('test.html', e.filename)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
155 if sys.version_info[:2] >= (2, 4):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
156 self.assertEqual(1, e.lineno)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
157
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
158 def test_directive_value_syntax_error(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
159 xml = '<p xmlns:py="http://purl.org/kid/ns#" py:if="bar\'" />'
21
b4d17897d053 * Include paths are now interpreted relative to the path of the including template. Closes #3.
cmlenz
parents: 10
diff changeset
160 tmpl = Template(xml, filename='test.html')
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
161 try:
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
162 list(tmpl.generate(Context()))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
163 self.fail('Expected SyntaxError')
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
164 except TemplateSyntaxError, e:
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
165 self.assertEqual('test.html', e.filename)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
166 if sys.version_info[:2] >= (2, 4):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
167 self.assertEqual(1, e.lineno)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
168 # We don't really care about the offset here, do we?
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
169
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
170 def test_expression_syntax_error(self):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
171 xml = '<p>\n Foo <em>${bar"}</em>\n</p>'
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
172 tmpl = Template(xml, filename='test.html')
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
173 ctxt = Context(bar='baz')
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
174 try:
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
175 list(tmpl.generate(ctxt))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
176 self.fail('Expected SyntaxError')
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
177 except TemplateSyntaxError, e:
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
178 self.assertEqual('test.html', e.filename)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
179 if sys.version_info[:2] >= (2, 4):
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
180 self.assertEqual(2, e.lineno)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
181 self.assertEqual(10, e.offset)
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
182
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
183
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
184 def suite():
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
185 suite = unittest.TestSuite()
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
186 suite.addTest(doctest.DocTestSuite(Template.__module__))
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
187 suite.addTest(unittest.makeSuite(TemplateTestCase, 'test'))
36
ed370ebfa794 Fix for #7: match templates no longer process their own output.
cmlenz
parents: 27
diff changeset
188 suite.addTest(unittest.makeSuite(MatchDirectiveTestCase, 'test'))
1
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
189 return suite
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
190
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
191 if __name__ == '__main__':
5479aae32f5a Initial import.
cmlenz
parents:
diff changeset
192 unittest.main(defaultTest='suite')
Copyright (C) 2012-2017 Edgewall Software