mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Correct test_pydoc for win32 platforms, to account for normalized URLs:
C:\temp => file:///C|temp/
This commit is contained in:
		
							parent
							
								
									b7fea62cca
								
							
						
					
					
						commit
						8e8de4afef
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -214,7 +214,12 @@ class PyDocDocTest(unittest.TestCase): | |||
|     def test_html_doc(self): | ||||
|         result, doc_loc = get_pydoc_html(pydoc_mod) | ||||
|         mod_file = inspect.getabsfile(pydoc_mod) | ||||
|         expected_html = expected_html_pattern % (mod_file, mod_file, doc_loc) | ||||
|         if sys.platform == 'win32': | ||||
|             import nturl2path | ||||
|             mod_url = nturl2path.pathname2url(mod_file) | ||||
|         else: | ||||
|             mod_url = mod_file | ||||
|         expected_html = expected_html_pattern % (mod_url, mod_file, doc_loc) | ||||
|         if result != expected_html: | ||||
|             print_diffs(expected_html, result) | ||||
|             self.fail("outputs are not equal, see diff above") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Amaury Forgeot d'Arc
						Amaury Forgeot d'Arc