Kaydet (Commit) 4cfbac80 authored tarafından Gregory P. Smith's avatar Gregory P. Smith

sort os.listxattr results before comparing it to avoid depending on the …

sort os.listxattr results before comparing it to avoid depending on the         ordering of the directory information in the underlying filesystem.
...@@ -431,7 +431,7 @@ class TestShutil(unittest.TestCase): ...@@ -431,7 +431,7 @@ class TestShutil(unittest.TestCase):
os.setxattr(src, 'user.foo', b'42') os.setxattr(src, 'user.foo', b'42')
os.setxattr(src, 'user.bar', b'43') os.setxattr(src, 'user.bar', b'43')
shutil._copyxattr(src, dst) shutil._copyxattr(src, dst)
self.assertEqual(os.listxattr(src), os.listxattr(dst)) self.assertEqual(sorted(os.listxattr(src)), sorted(os.listxattr(dst)))
self.assertEqual( self.assertEqual(
os.getxattr(src, 'user.foo'), os.getxattr(src, 'user.foo'),
os.getxattr(dst, 'user.foo')) os.getxattr(dst, 'user.foo'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment