From: Gregory P. Smith Date: Fri, 17 Jan 2014 20:01:22 +0000 (-0800) Subject: sort os.listxattr results before comparing it to avoid depending on the X-Git-Tag: v3.3.4rc1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1093bf2c7fd070eaed7314456c0c06703f6f0f39;p=python sort os.listxattr results before comparing it to avoid depending on the ordering of the directory information in the underlying filesystem. --- diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 8a8ce868b7..ac00cc438d 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -430,7 +430,7 @@ class TestShutil(unittest.TestCase): os.setxattr(src, 'user.foo', b'42') os.setxattr(src, 'user.bar', b'43') shutil._copyxattr(src, dst) - self.assertEqual(os.listxattr(src), os.listxattr(dst)) + self.assertEqual(sorted(os.listxattr(src)), sorted(os.listxattr(dst))) self.assertEqual( os.getxattr(src, 'user.foo'), os.getxattr(dst, 'user.foo'))