~pythonregexp2.7/python/issue2636-09-01+10

« back to all changes in this revision

Viewing changes to Lib/test/test_pydoc.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 21:39:45 UTC
  • mfrom: (39055.1.33 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922213945-23717m5eiqpamcyn
Merged in changes from the Single-Loop Engine branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
DATA
58
58
    __author__ = 'Benjamin Peterson'
59
59
    __credits__ = 'Nobody'
60
 
    __package__ = None
61
60
    __version__ = '1.2.3.4'
62
61
 
63
62
VERSION
146
145
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
147
146
<td width="100%%"><strong>__author__</strong> = 'Benjamin Peterson'<br>
148
147
<strong>__credits__</strong> = 'Nobody'<br>
149
 
<strong>__package__</strong> = None<br>
150
148
<strong>__version__</strong> = '1.2.3.4'</td></tr></table><p>
151
149
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
152
150
<tr bgcolor="#7799ee">
214
212
    def test_html_doc(self):
215
213
        result, doc_loc = get_pydoc_html(pydoc_mod)
216
214
        mod_file = inspect.getabsfile(pydoc_mod)
217
 
        expected_html = expected_html_pattern % (mod_file, mod_file, doc_loc)
 
215
        if sys.platform == 'win32':
 
216
            import nturl2path
 
217
            mod_url = nturl2path.pathname2url(mod_file)
 
218
        else:
 
219
            mod_url = mod_file
 
220
        expected_html = expected_html_pattern % (mod_url, mod_file, doc_loc)
218
221
        if result != expected_html:
219
222
            print_diffs(expected_html, result)
220
223
            self.fail("outputs are not equal, see diff above")