mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	
		
			
	
	
		
			27 lines
		
	
	
	
		
			349 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			27 lines
		
	
	
	
		
			349 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|   | # Test file locations | ||
|  | from gettext import gettext as _ | ||
|  | 
 | ||
|  | # Duplicate strings | ||
|  | _('foo') | ||
|  | _('foo') | ||
|  | 
 | ||
|  | # Duplicate strings on the same line should only add one location to the output | ||
|  | _('bar'), _('bar') | ||
|  | 
 | ||
|  | 
 | ||
|  | # Duplicate docstrings | ||
|  | class A: | ||
|  |     """docstring""" | ||
|  | 
 | ||
|  | 
 | ||
|  | def f(): | ||
|  |     """docstring""" | ||
|  | 
 | ||
|  | 
 | ||
|  | # Duplicate message and docstring | ||
|  | _('baz') | ||
|  | 
 | ||
|  | 
 | ||
|  | def g(): | ||
|  |     """baz""" |