mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	gh-91387: Fix tarfile test on WASI (GH-93984)
WASI's rmdir() syscall does not like the trailing slash.
This commit is contained in:
		
							parent
							
								
									fea1e9bc5c
								
							
						
					
					
						commit
						dd78aae34b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -1031,7 +1031,7 @@ def test_longname_directory(self):
 | 
				
			||||||
                    os.mkdir(longdir)
 | 
					                    os.mkdir(longdir)
 | 
				
			||||||
                    tar.add(longdir)
 | 
					                    tar.add(longdir)
 | 
				
			||||||
                finally:
 | 
					                finally:
 | 
				
			||||||
                    os.rmdir(longdir)
 | 
					                    os.rmdir(longdir.rstrip("/"))
 | 
				
			||||||
            with tarfile.open(tmpname) as tar:
 | 
					            with tarfile.open(tmpname) as tar:
 | 
				
			||||||
                self.assertIsNotNone(tar.getmember(longdir))
 | 
					                self.assertIsNotNone(tar.getmember(longdir))
 | 
				
			||||||
                self.assertIsNotNone(tar.getmember(longdir.removesuffix('/')))
 | 
					                self.assertIsNotNone(tar.getmember(longdir.removesuffix('/')))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue