def test_lsetxattr(self): """lsetxattr() sets an attribute on a file.""" if self.user_xattr_are_supported(): _obnam.lsetxattr(self.filename, "user.key", "value") _obnam.lsetxattr(self.filename, "user.hello", "world") ret = _obnam.llistxattr(self.filename) self.assertEqual(sorted(ret.strip("\0").split("\0")), ["user.hello", "user.key"])
def test_lsetxattr(self): '''lsetxattr() sets an attribute on a file.''' if self.user_xattr_are_supported(): _obnam.lsetxattr(self.filename, "user.key", "value") _obnam.lsetxattr(self.filename, "user.hello", "world") ret = _obnam.llistxattr(self.filename) self.assertEqual(sorted(ret.strip("\0").split("\0")), ["user.hello", "user.key"])
def test_empty_list(self): """A new file has no extended attributes.""" if self.user_xattr_are_supported(): self.assertEqual(_obnam.llistxattr(self.filename), "")
def test_empty_list(self): '''A new file has no extended attributes.''' if self.user_xattr_are_supported(): self.assertEqual(_obnam.llistxattr(self.filename), "")
def test_lsetxattr(self): '''lsetxattr() sets an attribute on a file.''' _obnam.lsetxattr(self.filename, "user.key", "value") _obnam.lsetxattr(self.filename, "user.hello", "world") self.assertEqual(sorted(_obnam.llistxattr(self.filename).strip("\0").split("\0")), ["user.hello", "user.key"])
def test_empty_list(self): '''A new file has no extended attributes.''' self.assertEqual(_obnam.llistxattr(self.filename), "")