fix the rest of py/code tests on python 3
--HG-- branch : trunk
This commit is contained in:
		
							parent
							
								
									96ec12902d
								
							
						
					
					
						commit
						0f7a9e2da2
					
				|  | @ -74,3 +74,6 @@ class AssertionError(BuiltinAssertionError): | |||
|                     self.args = (self.msg,) | ||||
|             else: | ||||
|                 self.msg = None | ||||
| 
 | ||||
| if sys.version_info > (3, 0): | ||||
|     AssertionError.__module__ = "builtins" | ||||
|  |  | |||
|  | @ -295,11 +295,15 @@ class TestFormattedExcinfo: | |||
|     def test_repr_source_excinfo(self): | ||||
|         """ check if indentation is right """ | ||||
|         pr = FormattedExcinfo() | ||||
|         excinfo = self.excinfo_from_exec(""" | ||||
|             def f(): | ||||
|                 assert 0 | ||||
|             f() | ||||
|         """) | ||||
|         py.code.patch_builtins() | ||||
|         try: | ||||
|             excinfo = self.excinfo_from_exec(""" | ||||
|                 def f(): | ||||
|                     assert 0 | ||||
|                 f() | ||||
|             """) | ||||
|         finally: | ||||
|             py.code.unpatch_builtins() | ||||
|         pr = FormattedExcinfo() | ||||
|         source = pr._getentrysource(excinfo.traceback[-1]) | ||||
|         lines = pr.get_source(source, 1, excinfo) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue