projects
/
rrq
/
fuse_xattrs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README.md: Add archlinux aur url.
[rrq/fuse_xattrs.git]
/
test
/
tests.py
diff --git
a/test/tests.py
b/test/tests.py
index 51e7b1e6a7295160ee05dc4945178ac4202697a0..38452e5c5a65d947d95e0445d3e1caeab0635aec 100755
(executable)
--- a/
test/tests.py
+++ b/
test/tests.py
@@
-14,6
+14,9
@@
import xattr
from pathlib import Path
import os
from pathlib import Path
import os
+if xattr.__version__ != '0.9.1':
+ print("WARNING, only tested with xattr version 0.9.1")
+
# TODO
# - listxattr: list too long
# - sidecar file permissions
# TODO
# - listxattr: list too long
# - sidecar file permissions
@@
-161,9
+164,9
@@
class TestXAttrs(unittest.TestCase):
def test_xattr_list(self):
enc = "utf-8"
def test_xattr_list(self):
enc = "utf-8"
- key1 =
b
"user.foo"
- key2 =
b
"user.foo2"
- key3 =
b
"user.foo3"
+ key1 = "user.foo"
+ key2 = "user.foo2"
+ key3 = "user.foo3"
value = "bar"
# set 3 keys
value = "bar"
# set 3 keys
@@
-190,7
+193,7
@@
class TestXAttrs(unittest.TestCase):
# list
attrs = xattr.listxattr(self.randomFile)
self.assertEqual(len(attrs), 1)
# list
attrs = xattr.listxattr(self.randomFile)
self.assertEqual(len(attrs), 1)
- self.assert
True(key.encode() in attrs
)
+ self.assert
Equal(attrs[0], key
)
# read
read_value = xattr.getxattr(self.randomFile, key)
# read
read_value = xattr.getxattr(self.randomFile, key)