summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2014-01-17 20:01:22 (GMT)
committerGregory P. Smith <greg@krypto.org>2014-01-17 20:01:22 (GMT)
commit1093bf2c7fd070eaed7314456c0c06703f6f0f39 (patch)
tree10b5ecdefca50e36ac42071fb7c302e84ddb4946 /Lib
parenteb14deca15673b77deb6f5d6dc54d3dd6a4cfb99 (diff)
downloadcpython-1093bf2c7fd070eaed7314456c0c06703f6f0f39.zip
cpython-1093bf2c7fd070eaed7314456c0c06703f6f0f39.tar.gz
cpython-1093bf2c7fd070eaed7314456c0c06703f6f0f39.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 8a8ce86..ac00cc4 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'))