summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2014-01-17 20:01:40 (GMT)
committerGregory P. Smith <greg@krypto.org>2014-01-17 20:01:40 (GMT)
commit4cfbac80bd6545ff9f8425fa30a7d25bb9ba5142 (patch)
tree3d706550dfb0c40328da5d908443d715711da264 /Lib
parent5714e815c965b9a66bb6f9a3808b5ef25f7f25d8 (diff)
parent1093bf2c7fd070eaed7314456c0c06703f6f0f39 (diff)
downloadcpython-4cfbac80bd6545ff9f8425fa30a7d25bb9ba5142.zip
cpython-4cfbac80bd6545ff9f8425fa30a7d25bb9ba5142.tar.gz
cpython-4cfbac80bd6545ff9f8425fa30a7d25bb9ba5142.tar.bz2
sort os.listxattr results before comparing it to avoid depending on the ordering of the directory information in the underlying filesystem.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_shutil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 9bedaee..1f47b03 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -431,7 +431,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'))