mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Issue #24838: Merge test_tarfile.py fix from 3.5.
This commit is contained in:
		
						commit
						daac5f9f92
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -1795,7 +1795,7 @@ class UstarUnicodeTest(UnicodeTest, unittest.TestCase):
 | 
				
			||||||
                self.assertRaises(exc, tar.addfile, t)
 | 
					                self.assertRaises(exc, tar.addfile, t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if exc is None:
 | 
					        if exc is None:
 | 
				
			||||||
            with tarfile.open(tmpname, "r") as tar:
 | 
					            with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
 | 
				
			||||||
                for t in tar:
 | 
					                for t in tar:
 | 
				
			||||||
                    self.assertEqual(name, t.name)
 | 
					                    self.assertEqual(name, t.name)
 | 
				
			||||||
                    break
 | 
					                    break
 | 
				
			||||||
| 
						 | 
					@ -1821,7 +1821,7 @@ class UstarUnicodeTest(UnicodeTest, unittest.TestCase):
 | 
				
			||||||
                self.assertRaises(exc, tar.addfile, t)
 | 
					                self.assertRaises(exc, tar.addfile, t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if exc is None:
 | 
					        if exc is None:
 | 
				
			||||||
            with tarfile.open(tmpname, "r") as tar:
 | 
					            with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
 | 
				
			||||||
                for t in tar:
 | 
					                for t in tar:
 | 
				
			||||||
                    self.assertEqual(name, t.linkname)
 | 
					                    self.assertEqual(name, t.linkname)
 | 
				
			||||||
                    break
 | 
					                    break
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue