mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	make deprecation check more specific
This commit is contained in:
		
							parent
							
								
									0f27ddafb7
								
							
						
					
					
						commit
						dd985b2a5e
					
				|  | @ -311,7 +311,6 @@ def test_read_binary_preview(): | ||||||
|         pass |         pass | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @pytest.mark.filterwarnings("ignore::DeprecationWarning") |  | ||||||
| def test_readline_psfile(tmp_path): | def test_readline_psfile(tmp_path): | ||||||
|     # check all the freaking line endings possible from the spec |     # check all the freaking line endings possible from the spec | ||||||
|     # test_string = u'something\r\nelse\n\rbaz\rbif\n' |     # test_string = u'something\r\nelse\n\rbaz\rbif\n' | ||||||
|  | @ -329,6 +328,7 @@ def test_readline_psfile(tmp_path): | ||||||
| 
 | 
 | ||||||
|     def _test_readline_io_psfile(test_string, ending): |     def _test_readline_io_psfile(test_string, ending): | ||||||
|         f = io.BytesIO(test_string.encode("latin-1")) |         f = io.BytesIO(test_string.encode("latin-1")) | ||||||
|  |         with pytest.warns(DeprecationWarning): | ||||||
|             t = EpsImagePlugin.PSFile(f) |             t = EpsImagePlugin.PSFile(f) | ||||||
|         _test_readline(t, ending) |         _test_readline(t, ending) | ||||||
| 
 | 
 | ||||||
|  | @ -338,6 +338,7 @@ def test_readline_psfile(tmp_path): | ||||||
|             w.write(test_string.encode("latin-1")) |             w.write(test_string.encode("latin-1")) | ||||||
| 
 | 
 | ||||||
|         with open(f, "rb") as r: |         with open(f, "rb") as r: | ||||||
|  |             with pytest.warns(DeprecationWarning): | ||||||
|                 t = EpsImagePlugin.PSFile(r) |                 t = EpsImagePlugin.PSFile(r) | ||||||
|             _test_readline(t, ending) |             _test_readline(t, ending) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user