mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	gh-118121: Fix test_doctest.test_look_in_unwrapped (#118122)
				
					
				
			This commit is contained in:
		
							parent
							
								
									5fa5b7facb
								
							
						
					
					
						commit
						ccda738284
					
				
					 1 changed files with 16 additions and 1 deletions
				
			
		| 
						 | 
					@ -2545,7 +2545,7 @@ class Wrapper:
 | 
				
			||||||
        self.func(*args, **kwargs)
 | 
					        self.func(*args, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Wrapper
 | 
					@Wrapper
 | 
				
			||||||
def test_look_in_unwrapped():
 | 
					def wrapped():
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    Docstrings in wrapped functions must be detected as well.
 | 
					    Docstrings in wrapped functions must be detected as well.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2553,6 +2553,21 @@ def test_look_in_unwrapped():
 | 
				
			||||||
    'one other test'
 | 
					    'one other test'
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def test_look_in_unwrapped():
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    Ensure that wrapped doctests work correctly.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    >>> import doctest
 | 
				
			||||||
 | 
					    >>> doctest.run_docstring_examples(
 | 
				
			||||||
 | 
					    ...     wrapped, {}, name=wrapped.__name__, verbose=True)
 | 
				
			||||||
 | 
					    Finding tests in wrapped
 | 
				
			||||||
 | 
					    Trying:
 | 
				
			||||||
 | 
					        'one other test'
 | 
				
			||||||
 | 
					    Expecting:
 | 
				
			||||||
 | 
					        'one other test'
 | 
				
			||||||
 | 
					    ok
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@doctest_skip_if(support.check_impl_detail(cpython=False))
 | 
					@doctest_skip_if(support.check_impl_detail(cpython=False))
 | 
				
			||||||
def test_wrapped_c_func():
 | 
					def test_wrapped_c_func():
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue