mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 14:30:30 +03:00 
			
		
		
		
	index: handle image processing diffs across various Python versions
Apparently, the newest Python thingies strip the PNGs a tiny bit smaller, so a fixed file size will lead to the test failing: https://gitlab.com/fdroid/fdroidserver/-/jobs/6703386074 ``` Traceback (most recent call last): File "/builds/fdroid/fdroidserver/tests/index.TestCase", line 704, in test_package_metadata self.assertEqual(36027, metadata['featureGraphic']['en-US']['size']) AssertionError: 36027 != 35619 ```
This commit is contained in:
		
							parent
							
								
									1cb1394de3
								
							
						
					
					
						commit
						299e3e5f4c
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -701,8 +701,14 @@ class IndexTest(unittest.TestCase):
 | 
			
		|||
        app = apps[appid]
 | 
			
		||||
        metadata = index.package_metadata(app, 'repo')
 | 
			
		||||
        # files
 | 
			
		||||
        self.assertEqual(36027, metadata['featureGraphic']['en-US']['size'])
 | 
			
		||||
        self.assertEqual(1413, metadata['icon']['en-US']['size'])
 | 
			
		||||
        self.assertEqual(
 | 
			
		||||
            os.path.getsize(f'repo/{appid}/en-US/featureGraphic.png'),
 | 
			
		||||
            metadata['featureGraphic']['en-US']['size'],
 | 
			
		||||
        )
 | 
			
		||||
        self.assertEqual(
 | 
			
		||||
            os.path.getsize(f'repo/{appid}/en-US/icon.png'),
 | 
			
		||||
            metadata['icon']['en-US']['size'],
 | 
			
		||||
        )
 | 
			
		||||
        # localized strings
 | 
			
		||||
        self.assertEqual({'en-US': 'title'}, metadata['name'])
 | 
			
		||||
        self.assertEqual({'en-US': 'video'}, metadata['video'])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue