Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cfbac8

Browse files
committed
sort os.listxattr results before comparing it to avoid depending on the ordering of the directory information in the underlying filesystem.
2 parents 5714e81 + 1093bf2 commit 4cfbac8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_shutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def test_copyxattr(self):
431431
os.setxattr(src, 'user.foo', b'42')
432432
os.setxattr(src, 'user.bar', b'43')
433433
shutil._copyxattr(src, dst)
434-
self.assertEqual(os.listxattr(src), os.listxattr(dst))
434+
self.assertEqual(sorted(os.listxattr(src)), sorted(os.listxattr(dst)))
435435
self.assertEqual(
436436
os.getxattr(src, 'user.foo'),
437437
os.getxattr(dst, 'user.foo'))

0 commit comments

Comments
 (0)