Fix tarfile to support non-unicode pax fields

This commit is contained in:
Jake Moshenko 2015-08-07 11:56:38 -04:00
parent 44584ff0d8
commit 74d838697f
5 changed files with 2651 additions and 1 deletions

View file

@ -62,5 +62,12 @@ class TestChanges(unittest.TestCase):
self.assertIn('another_file', deleted_prefixes)
def test_pax_tarfile_error(self):
# If this fails it will raise an exception
with open('test/data/sample/layers/paxheader.tar') as tarstream:
result = list(files_and_dirs_from_tar(tarstream, set()))
self.assertIn('/file', result)
if __name__ == '__main__':
unittest.main()