Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 1 | import sys |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 2 | import os |
R. David Murray | ef087da | 2009-06-23 18:02:46 +0000 | [diff] [blame] | 3 | import os.path |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 4 | import difflib |
| 5 | import subprocess |
| 6 | import re |
| 7 | import pydoc |
Georg Brandl | b7e419e | 2008-05-20 08:10:03 +0000 | [diff] [blame] | 8 | import inspect |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 9 | import unittest |
Brian Curtin | aeb2e82 | 2010-03-31 03:10:21 +0000 | [diff] [blame^] | 10 | import xml.etree |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 11 | import test.test_support |
R. David Murray | ef087da | 2009-06-23 18:02:46 +0000 | [diff] [blame] | 12 | from contextlib import contextmanager |
Antoine Pitrou | 161df94 | 2009-10-30 21:41:22 +0000 | [diff] [blame] | 13 | from test.test_support import ( |
| 14 | TESTFN, forget, rmtree, EnvironmentVarGuard, reap_children) |
Benjamin Peterson | f5c38da | 2008-05-18 20:48:07 +0000 | [diff] [blame] | 15 | |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 16 | from test import pydoc_mod |
| 17 | |
| 18 | expected_text_pattern = \ |
| 19 | """ |
| 20 | NAME |
| 21 | test.pydoc_mod - This is a test module for test_pydoc |
| 22 | |
| 23 | FILE |
| 24 | %s |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 25 | %s |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 26 | CLASSES |
| 27 | __builtin__.object |
| 28 | B |
| 29 | A |
| 30 | \x20\x20\x20\x20 |
| 31 | class A |
| 32 | | Hello and goodbye |
| 33 | |\x20\x20 |
| 34 | | Methods defined here: |
| 35 | |\x20\x20 |
| 36 | | __init__() |
| 37 | | Wow, I have no function! |
| 38 | \x20\x20\x20\x20 |
| 39 | class B(__builtin__.object) |
| 40 | | Data descriptors defined here: |
| 41 | |\x20\x20 |
| 42 | | __dict__ |
| 43 | | dictionary for instance variables (if defined) |
| 44 | |\x20\x20 |
| 45 | | __weakref__ |
| 46 | | list of weak references to the object (if defined) |
| 47 | |\x20\x20 |
| 48 | | ---------------------------------------------------------------------- |
| 49 | | Data and other attributes defined here: |
| 50 | |\x20\x20 |
| 51 | | NO_MEANING = 'eggs' |
| 52 | |
| 53 | FUNCTIONS |
| 54 | doc_func() |
| 55 | This function solves all of the world's problems: |
| 56 | hunger |
| 57 | lack of Python |
| 58 | war |
| 59 | \x20\x20\x20\x20 |
| 60 | nodoc_func() |
| 61 | |
| 62 | DATA |
| 63 | __author__ = 'Benjamin Peterson' |
| 64 | __credits__ = 'Nobody' |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 65 | __version__ = '1.2.3.4' |
| 66 | |
| 67 | VERSION |
| 68 | 1.2.3.4 |
| 69 | |
| 70 | AUTHOR |
| 71 | Benjamin Peterson |
| 72 | |
| 73 | CREDITS |
| 74 | Nobody |
| 75 | """.strip() |
| 76 | |
| 77 | expected_html_pattern = \ |
| 78 | """ |
| 79 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| 80 | <tr bgcolor="#7799ee"> |
| 81 | <td valign=bottom> <br> |
| 82 | <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="test.html"><font color="#ffffff">test</font></a>.pydoc_mod</strong></big></big> (version 1.2.3.4)</font></td |
| 83 | ><td align=right valign=bottom |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 84 | ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:%s">%s</a>%s</font></td></tr></table> |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 85 | <p><tt>This is a test module for test_pydoc</tt></p> |
| 86 | <p> |
| 87 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 88 | <tr bgcolor="#ee77aa"> |
| 89 | <td colspan=3 valign=bottom> <br> |
| 90 | <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| 91 | \x20\x20\x20\x20 |
| 92 | <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
| 93 | <td width="100%%"><dl> |
| 94 | <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> |
| 95 | </font></dt><dd> |
| 96 | <dl> |
| 97 | <dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#B">B</a> |
| 98 | </font></dt></dl> |
| 99 | </dd> |
| 100 | <dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#A">A</a> |
| 101 | </font></dt></dl> |
| 102 | <p> |
| 103 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 104 | <tr bgcolor="#ffc8d8"> |
| 105 | <td colspan=3 valign=bottom> <br> |
| 106 | <font color="#000000" face="helvetica, arial"><a name="A">class <strong>A</strong></a></font></td></tr> |
| 107 | \x20\x20\x20\x20 |
| 108 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 109 | <td colspan=2><tt>Hello and goodbye<br> </tt></td></tr> |
| 110 | <tr><td> </td> |
| 111 | <td width="100%%">Methods defined here:<br> |
| 112 | <dl><dt><a name="A-__init__"><strong>__init__</strong></a>()</dt><dd><tt>Wow, I have no function!</tt></dd></dl> |
| 113 | |
| 114 | </td></tr></table> <p> |
| 115 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 116 | <tr bgcolor="#ffc8d8"> |
| 117 | <td colspan=3 valign=bottom> <br> |
| 118 | <font color="#000000" face="helvetica, arial"><a name="B">class <strong>B</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| 119 | \x20\x20\x20\x20 |
| 120 | <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 121 | <td width="100%%">Data descriptors defined here:<br> |
| 122 | <dl><dt><strong>__dict__</strong></dt> |
| 123 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 124 | </dl> |
| 125 | <dl><dt><strong>__weakref__</strong></dt> |
| 126 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 127 | </dl> |
| 128 | <hr> |
| 129 | Data and other attributes defined here:<br> |
| 130 | <dl><dt><strong>NO_MEANING</strong> = 'eggs'</dl> |
| 131 | |
| 132 | </td></tr></table></td></tr></table><p> |
| 133 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 134 | <tr bgcolor="#eeaa77"> |
| 135 | <td colspan=3 valign=bottom> <br> |
| 136 | <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> |
| 137 | \x20\x20\x20\x20 |
| 138 | <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> |
| 139 | <td width="100%%"><dl><dt><a name="-doc_func"><strong>doc_func</strong></a>()</dt><dd><tt>This function solves all of the world's problems:<br> |
| 140 | hunger<br> |
| 141 | lack of Python<br> |
| 142 | war</tt></dd></dl> |
| 143 | <dl><dt><a name="-nodoc_func"><strong>nodoc_func</strong></a>()</dt></dl> |
| 144 | </td></tr></table><p> |
| 145 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 146 | <tr bgcolor="#55aa55"> |
| 147 | <td colspan=3 valign=bottom> <br> |
| 148 | <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| 149 | \x20\x20\x20\x20 |
| 150 | <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
| 151 | <td width="100%%"><strong>__author__</strong> = 'Benjamin Peterson'<br> |
| 152 | <strong>__credits__</strong> = 'Nobody'<br> |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 153 | <strong>__version__</strong> = '1.2.3.4'</td></tr></table><p> |
| 154 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 155 | <tr bgcolor="#7799ee"> |
| 156 | <td colspan=3 valign=bottom> <br> |
| 157 | <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| 158 | \x20\x20\x20\x20 |
| 159 | <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| 160 | <td width="100%%">Benjamin Peterson</td></tr></table><p> |
| 161 | <table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 162 | <tr bgcolor="#7799ee"> |
| 163 | <td colspan=3 valign=bottom> <br> |
| 164 | <font color="#ffffff" face="helvetica, arial"><big><strong>Credits</strong></big></font></td></tr> |
| 165 | \x20\x20\x20\x20 |
| 166 | <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| 167 | <td width="100%%">Nobody</td></tr></table> |
| 168 | """.strip() |
| 169 | |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 170 | |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 171 | # output pattern for missing module |
| 172 | missing_pattern = "no Python documentation found for '%s'" |
| 173 | |
R. David Murray | ef087da | 2009-06-23 18:02:46 +0000 | [diff] [blame] | 174 | # output pattern for module with bad imports |
| 175 | badimport_pattern = "problem in %s - <type 'exceptions.ImportError'>: No module named %s" |
| 176 | |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 177 | def run_pydoc(module_name, *args): |
| 178 | """ |
| 179 | Runs pydoc on the specified module. Returns the stripped |
| 180 | output of pydoc. |
| 181 | """ |
| 182 | cmd = [sys.executable, pydoc.__file__, " ".join(args), module_name] |
Antoine Pitrou | 161df94 | 2009-10-30 21:41:22 +0000 | [diff] [blame] | 183 | try: |
| 184 | output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] |
| 185 | return output.strip() |
| 186 | finally: |
| 187 | reap_children() |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 188 | |
| 189 | def get_pydoc_html(module): |
| 190 | "Returns pydoc generated output as html" |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 191 | doc = pydoc.HTMLDoc() |
| 192 | output = doc.docmodule(module) |
| 193 | loc = doc.getdocloc(pydoc_mod) or "" |
| 194 | if loc: |
| 195 | loc = "<br><a href=\"" + loc + "\">Module Docs</a>" |
| 196 | return output.strip(), loc |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 197 | |
| 198 | def get_pydoc_text(module): |
| 199 | "Returns pydoc generated output as text" |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 200 | doc = pydoc.TextDoc() |
| 201 | loc = doc.getdocloc(pydoc_mod) or "" |
| 202 | if loc: |
| 203 | loc = "\nMODULE DOCS\n " + loc + "\n" |
| 204 | |
| 205 | output = doc.docmodule(module) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 206 | |
| 207 | # cleanup the extra text formatting that pydoc preforms |
| 208 | patt = re.compile('\b.') |
| 209 | output = patt.sub('', output) |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 210 | return output.strip(), loc |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 211 | |
| 212 | def print_diffs(text1, text2): |
| 213 | "Prints unified diffs for two texts" |
Georg Brandl | fb3de1f | 2008-05-20 08:07:36 +0000 | [diff] [blame] | 214 | lines1 = text1.splitlines(True) |
| 215 | lines2 = text2.splitlines(True) |
| 216 | diffs = difflib.unified_diff(lines1, lines2, n=0, fromfile='expected', |
| 217 | tofile='got') |
| 218 | print '\n' + ''.join(diffs) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 219 | |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 220 | |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 221 | class PyDocDocTest(unittest.TestCase): |
| 222 | |
R. David Murray | f28fd24 | 2010-02-23 00:24:49 +0000 | [diff] [blame] | 223 | @unittest.skipIf(sys.flags.optimize >= 2, |
| 224 | "Docstrings are omitted with -O2 and above") |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 225 | def test_html_doc(self): |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 226 | result, doc_loc = get_pydoc_html(pydoc_mod) |
Georg Brandl | b7e419e | 2008-05-20 08:10:03 +0000 | [diff] [blame] | 227 | mod_file = inspect.getabsfile(pydoc_mod) |
Amaury Forgeot d'Arc | 8e8de4a | 2008-06-10 21:37:15 +0000 | [diff] [blame] | 228 | if sys.platform == 'win32': |
| 229 | import nturl2path |
| 230 | mod_url = nturl2path.pathname2url(mod_file) |
| 231 | else: |
| 232 | mod_url = mod_file |
| 233 | expected_html = expected_html_pattern % (mod_url, mod_file, doc_loc) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 234 | if result != expected_html: |
Georg Brandl | fb3de1f | 2008-05-20 08:07:36 +0000 | [diff] [blame] | 235 | print_diffs(expected_html, result) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 236 | self.fail("outputs are not equal, see diff above") |
| 237 | |
R. David Murray | f28fd24 | 2010-02-23 00:24:49 +0000 | [diff] [blame] | 238 | @unittest.skipIf(sys.flags.optimize >= 2, |
| 239 | "Docstrings are omitted with -O2 and above") |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 240 | def test_text_doc(self): |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 241 | result, doc_loc = get_pydoc_text(pydoc_mod) |
| 242 | expected_text = expected_text_pattern % \ |
| 243 | (inspect.getabsfile(pydoc_mod), doc_loc) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 244 | if result != expected_text: |
Georg Brandl | fb3de1f | 2008-05-20 08:07:36 +0000 | [diff] [blame] | 245 | print_diffs(expected_text, result) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 246 | self.fail("outputs are not equal, see diff above") |
| 247 | |
Brian Curtin | aeb2e82 | 2010-03-31 03:10:21 +0000 | [diff] [blame^] | 248 | def test_issue8225(self): |
| 249 | # Test issue8225 to ensure no doc link appears for xml.etree |
| 250 | result, doc_loc = get_pydoc_text(xml.etree) |
| 251 | self.assertEqual(doc_loc, "", "MODULE DOCS incorrectly includes a link") |
| 252 | |
Benjamin Peterson | f5c38da | 2008-05-18 20:48:07 +0000 | [diff] [blame] | 253 | def test_not_here(self): |
| 254 | missing_module = "test.i_am_not_here" |
| 255 | result = run_pydoc(missing_module) |
| 256 | expected = missing_pattern % missing_module |
| 257 | self.assertEqual(expected, result, |
| 258 | "documentation for missing module found") |
| 259 | |
R. David Murray | ef087da | 2009-06-23 18:02:46 +0000 | [diff] [blame] | 260 | def test_badimport(self): |
| 261 | # This tests the fix for issue 5230, where if pydoc found the module |
| 262 | # but the module had an internal import error pydoc would report no doc |
| 263 | # found. |
| 264 | modname = 'testmod_xyzzy' |
| 265 | testpairs = ( |
| 266 | ('i_am_not_here', 'i_am_not_here'), |
| 267 | ('test.i_am_not_here_either', 'i_am_not_here_either'), |
| 268 | ('test.i_am_not_here.neither_am_i', 'i_am_not_here.neither_am_i'), |
| 269 | ('i_am_not_here.{}'.format(modname), 'i_am_not_here.{}'.format(modname)), |
| 270 | ('test.{}'.format(modname), modname), |
| 271 | ) |
| 272 | |
| 273 | @contextmanager |
| 274 | def newdirinpath(dir): |
| 275 | os.mkdir(dir) |
| 276 | sys.path.insert(0, dir) |
| 277 | yield |
| 278 | sys.path.pop(0) |
| 279 | rmtree(dir) |
| 280 | |
| 281 | with newdirinpath(TESTFN), EnvironmentVarGuard() as env: |
| 282 | env['PYTHONPATH'] = TESTFN |
| 283 | fullmodname = os.path.join(TESTFN, modname) |
| 284 | sourcefn = fullmodname + os.extsep + "py" |
| 285 | for importstring, expectedinmsg in testpairs: |
| 286 | f = open(sourcefn, 'w') |
| 287 | f.write("import {}\n".format(importstring)) |
| 288 | f.close() |
| 289 | try: |
| 290 | result = run_pydoc(modname) |
| 291 | finally: |
| 292 | forget(modname) |
| 293 | expected = badimport_pattern % (modname, expectedinmsg) |
| 294 | self.assertEqual(expected, result) |
| 295 | |
R. David Murray | d67ea7d | 2009-05-27 20:07:21 +0000 | [diff] [blame] | 296 | def test_input_strip(self): |
| 297 | missing_module = " test.i_am_not_here " |
| 298 | result = run_pydoc(missing_module) |
| 299 | expected = missing_pattern % missing_module.strip() |
| 300 | self.assertEqual(expected, result, |
| 301 | "white space was not stripped from module name " |
| 302 | "or other error output mismatch") |
| 303 | |
Ezio Melotti | e511fc7 | 2010-02-16 23:26:09 +0000 | [diff] [blame] | 304 | def test_stripid(self): |
| 305 | # test with strings, other implementations might have different repr() |
| 306 | stripid = pydoc.stripid |
| 307 | # strip the id |
| 308 | self.assertEqual(stripid('<function stripid at 0x88dcee4>'), |
| 309 | '<function stripid>') |
| 310 | self.assertEqual(stripid('<function stripid at 0x01F65390>'), |
| 311 | '<function stripid>') |
| 312 | # nothing to strip, return the same text |
| 313 | self.assertEqual(stripid('42'), '42') |
| 314 | self.assertEqual(stripid("<type 'exceptions.Exception'>"), |
| 315 | "<type 'exceptions.Exception'>") |
| 316 | |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 317 | |
| 318 | class TestDescriptions(unittest.TestCase): |
Benjamin Peterson | f5c38da | 2008-05-18 20:48:07 +0000 | [diff] [blame] | 319 | |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 320 | def test_module(self): |
| 321 | # Check that pydocfodder module can be described |
| 322 | from test import pydocfodder |
| 323 | doc = pydoc.render_doc(pydocfodder) |
Ezio Melotti | aa98058 | 2010-01-23 23:04:36 +0000 | [diff] [blame] | 324 | self.assertIn("pydocfodder", doc) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 325 | |
| 326 | def test_classic_class(self): |
| 327 | class C: "Classic class" |
| 328 | c = C() |
Benjamin Peterson | f5c38da | 2008-05-18 20:48:07 +0000 | [diff] [blame] | 329 | self.assertEqual(pydoc.describe(C), 'class C') |
| 330 | self.assertEqual(pydoc.describe(c), 'instance of C') |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 331 | expected = 'instance of C in module %s' % __name__ |
Ezio Melotti | aa98058 | 2010-01-23 23:04:36 +0000 | [diff] [blame] | 332 | self.assertIn(expected, pydoc.render_doc(c)) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 333 | |
| 334 | def test_class(self): |
| 335 | class C(object): "New-style class" |
| 336 | c = C() |
| 337 | |
Benjamin Peterson | f5c38da | 2008-05-18 20:48:07 +0000 | [diff] [blame] | 338 | self.assertEqual(pydoc.describe(C), 'class C') |
| 339 | self.assertEqual(pydoc.describe(c), 'C') |
Benjamin Peterson | 3a7305e | 2008-05-22 23:09:26 +0000 | [diff] [blame] | 340 | expected = 'C in module %s object' % __name__ |
Ezio Melotti | aa98058 | 2010-01-23 23:04:36 +0000 | [diff] [blame] | 341 | self.assertIn(expected, pydoc.render_doc(c)) |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 342 | |
| 343 | |
| 344 | def test_main(): |
Benjamin Peterson | f5c38da | 2008-05-18 20:48:07 +0000 | [diff] [blame] | 345 | test.test_support.run_unittest(PyDocDocTest, |
Georg Brandl | 8632cc2 | 2008-05-18 16:32:48 +0000 | [diff] [blame] | 346 | TestDescriptions) |
| 347 | |
| 348 | if __name__ == "__main__": |
| 349 | test_main() |