mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-30 23:47:27 +03:00 
			
		
		
		
	Merge pull request #1788 from radarhere/root
Removed unused variable from selftest
This commit is contained in:
		
						commit
						0e35313065
					
				
							
								
								
									
										12
									
								
								selftest.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								selftest.py
									
									
									
									
									
								
							|  | @ -14,8 +14,6 @@ from PIL import features | ||||||
| if "--installed" in sys.argv: | if "--installed" in sys.argv: | ||||||
|     sys.path.insert(0, sys_path_0) |     sys.path.insert(0, sys_path_0) | ||||||
| 
 | 
 | ||||||
| ROOT = "." |  | ||||||
| 
 |  | ||||||
| try: | try: | ||||||
|     Image.core.ping |     Image.core.ping | ||||||
| except ImportError as v: | except ImportError as v: | ||||||
|  | @ -50,13 +48,13 @@ def testimage(): | ||||||
| 
 | 
 | ||||||
|     Or open existing files: |     Or open existing files: | ||||||
| 
 | 
 | ||||||
|     >>> im = Image.open(os.path.join(ROOT, "Tests/images/hopper.gif")) |     >>> im = Image.open("Tests/images/hopper.gif") | ||||||
|     >>> _info(im) |     >>> _info(im) | ||||||
|     ('GIF', 'P', (128, 128)) |     ('GIF', 'P', (128, 128)) | ||||||
|     >>> _info(Image.open(os.path.join(ROOT, "Tests/images/hopper.ppm"))) |     >>> _info(Image.open("Tests/images/hopper.ppm")) | ||||||
|     ('PPM', 'RGB', (128, 128)) |     ('PPM', 'RGB', (128, 128)) | ||||||
|     >>> try: |     >>> try: | ||||||
|     ...  _info(Image.open(os.path.join(ROOT, "Tests/images/hopper.jpg"))) |     ...  _info(Image.open("Tests/images/hopper.jpg")) | ||||||
|     ... except IOError as v: |     ... except IOError as v: | ||||||
|     ...  print(v) |     ...  print(v) | ||||||
|     ('JPEG', 'RGB', (128, 128)) |     ('JPEG', 'RGB', (128, 128)) | ||||||
|  | @ -64,7 +62,7 @@ def testimage(): | ||||||
|     PIL doesn't actually load the image data until it's needed, |     PIL doesn't actually load the image data until it's needed, | ||||||
|     or you call the "load" method: |     or you call the "load" method: | ||||||
| 
 | 
 | ||||||
|     >>> im = Image.open(os.path.join(ROOT, "Tests/images/hopper.ppm")) |     >>> im = Image.open("Tests/images/hopper.ppm") | ||||||
|     >>> print(im.im) # internal image attribute |     >>> print(im.im) # internal image attribute | ||||||
|     None |     None | ||||||
|     >>> a = im.load() |     >>> a = im.load() | ||||||
|  | @ -74,7 +72,7 @@ def testimage(): | ||||||
|     You can apply many different operations on images.  Most |     You can apply many different operations on images.  Most | ||||||
|     operations return a new image: |     operations return a new image: | ||||||
| 
 | 
 | ||||||
|     >>> im = Image.open(os.path.join(ROOT, "Tests/images/hopper.ppm")) |     >>> im = Image.open("Tests/images/hopper.ppm") | ||||||
|     >>> _info(im.convert("L")) |     >>> _info(im.convert("L")) | ||||||
|     (None, 'L', (128, 128)) |     (None, 'L', (128, 128)) | ||||||
|     >>> _info(im.copy()) |     >>> _info(im.copy()) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user