mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Add another little test to make sure we roundtrip multiple list comp ifs ok.
Add tests for generator expressions too.
This commit is contained in:
		
							parent
							
								
									4b194fabdf
								
							
						
					
					
						commit
						d3a9162e5e
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -51,6 +51,10 @@ def test_expressions(self): | |||
|         self.check_expr("[1, 2, 3]") | ||||
|         self.check_expr("[x**3 for x in range(20)]") | ||||
|         self.check_expr("[x**3 for x in range(20) if x % 3]") | ||||
|         self.check_expr("[x**3 for x in range(20) if x % 2 if x % 3]") | ||||
|         self.check_expr("list(x**3 for x in range(20))") | ||||
|         self.check_expr("list(x**3 for x in range(20) if x % 3)") | ||||
|         self.check_expr("list(x**3 for x in range(20) if x % 2 if x % 3)") | ||||
|         self.check_expr("foo(*args)") | ||||
|         self.check_expr("foo(*args, **kw)") | ||||
|         self.check_expr("foo(**kw)") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neal Norwitz
						Neal Norwitz