mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	group test cases
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									76a51270fa
								
							
						
					
					
						commit
						4b2a0173d3
					
				| 
						 | 
				
			
			@ -330,7 +330,9 @@ class TestCffi(AccessTest):
 | 
			
		|||
 | 
			
		||||
class TestImagePutPixelError(AccessTest):
 | 
			
		||||
    IMAGE_MODES1 = ["L", "LA", "RGB", "RGBA"]
 | 
			
		||||
    IMAGE_MODES2 = ["I", "I;16", "BGR;15"]
 | 
			
		||||
    INVALID_TYPES1 = ["foo", 1.0, None]
 | 
			
		||||
    INVALID_TYPES2 = [*INVALID_TYPES1, (10,)]
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.parametrize("mode", IMAGE_MODES1)
 | 
			
		||||
    def test_putpixel_type_error1(self, mode):
 | 
			
		||||
| 
						 | 
				
			
			@ -339,9 +341,6 @@ class TestImagePutPixelError(AccessTest):
 | 
			
		|||
            with pytest.raises(TypeError, match="color must be int or tuple"):
 | 
			
		||||
                im.putpixel((0, 0), v)
 | 
			
		||||
 | 
			
		||||
    IMAGE_MODES2 = ["I", "I;16", "BGR;15"]
 | 
			
		||||
    INVALID_TYPES2 = [*INVALID_TYPES1, (10,)]
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.parametrize("mode", IMAGE_MODES2)
 | 
			
		||||
    def test_putpixel_type_error2(self, mode):
 | 
			
		||||
        im = hopper(mode)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user