[Python-checkins] cpython (3.3): sort os.listxattr results before comparing it to avoid depending on the

gregory.p.smith python-checkins at python.org
Fri Jan 17 21:01:54 CET 2014


http://hg.python.org/cpython/rev/38333fa7dfe4
changeset: 88527:38333fa7dfe4
branch: 3.3
parent: 88525:4d867dc0d5fb
user: Gregory P. Smith <greg at krypto.org>
date: Fri Jan 17 12:01:22 2014 -0800
summary:
 sort os.listxattr results before comparing it to avoid depending on the
ordering of the directory information in the underlying filesystem.
files:
 Lib/test/test_shutil.py | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -430,7 +430,7 @@
 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'))
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /