def test_set_and_get_native(self):
        if not samba.xattr_native.is_xattr_supported():
            raise TestSkipped()
        tempf = self._tmpfilename()
        reftxt = "this is a test"
        open(tempf, 'w').write("empty")
        try:
            samba.xattr_native.wrap_setxattr(tempf, "user.unittests", reftxt)
            text = samba.xattr_native.wrap_getxattr(tempf, "user.unittests")
            self.assertEquals(text, reftxt)
        except __HOLE__:
            raise TestSkipped("the filesystem where the tests are runned do not support XATTR")
        os.unlink(tempf)
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/tests/xattr.py/XattrTests.test_set_and_get_native