[svn r37297] Fixed dependency on order in the function argument formatting tests.
--HG-- branch : trunk
This commit is contained in:
		
							parent
							
								
									3fb8b07b57
								
							
						
					
					
						commit
						0b8e0f869a
					
				|  | @ -127,16 +127,25 @@ class TestApiPageBuilder(AbstractBuilderTest): | ||||||
|         snippet = apb.build_callable_view('main.sub.func') |         snippet = apb.build_callable_view('main.sub.func') | ||||||
|         html = snippet.unicode() |         html = snippet.unicode() | ||||||
|         print html |         print html | ||||||
|         run_string_sequence_test(html, [ |         # XXX somewhat grokky tests because the order of the items may change | ||||||
|             'arg1 : AnyOf(', |         assert 'arg1: AnyOf(' in html | ||||||
|             'href="', |         pos1 = html.find('arg1: AnyOf(') | ||||||
|             'Class SomeClass', |         assert pos1 > -1 | ||||||
|             'Int>', |         pos2 = html.find('href="', pos1) | ||||||
|             'return value:', |         assert pos2 > pos1 | ||||||
|             '<None>', |         pos3 = html.find('Class SomeClass', pos2) | ||||||
|             'source: %s' % (self.fs_root.join('pkg/func.py'),), |         assert pos3 > pos2 | ||||||
|             'def func(arg1):', |         pos4 = html.find('Int>', pos1) | ||||||
|         ]) |         assert pos4 > pos1 | ||||||
|  |         pos5 = html.find('return value:', pos4) | ||||||
|  |         assert pos5 > pos4 and pos5 > pos3 | ||||||
|  |         pos6 = html.find('<None>', pos5) | ||||||
|  |         assert pos6 > pos5 | ||||||
|  |         pos7 = html.find('source: %s' % (self.fs_root.join('pkg/func.py'),), | ||||||
|  |                           pos6) | ||||||
|  |         assert pos7 > pos6 | ||||||
|  |         pos8 = html.find('def func(arg1):', pos7) | ||||||
|  |         assert pos8 > pos7 | ||||||
|         _checkhtmlsnippet(html) |         _checkhtmlsnippet(html) | ||||||
| 
 | 
 | ||||||
|     def test_build_function_pages(self): |     def test_build_function_pages(self): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue