mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
sort os.listxattr results before comparing it to avoid depending on the ordering of the directory information in the underlying filesystem.
This commit is contained in:
commit
4cfbac80bd
1 changed files with 1 additions and 1 deletions
|
@ -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'))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue