MCPcopy Index your code
hub / github.com/python/cpython / supports_extended_attributes

Function supports_extended_attributes

Lib/test/test_os/test_os.py:3737–3750  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3735
3736
3737def supports_extended_attributes():
3738 if not hasattr(os, "setxattr"):
3739 return False
3740
3741 try:
3742 with open(os_helper.TESTFN, "xb", 0) as fp:
3743 try:
3744 os.setxattr(fp.fileno(), b"user.test", b"")
3745 except OSError:
3746 return False
3747 finally:
3748 os_helper.unlink(os_helper.TESTFN)
3749
3750 return True
3751
3752
3753@unittest.skipUnless(supports_extended_attributes(),

Callers

nothing calls this directly

Calls 4

setxattrMethod · 0.80
openFunction · 0.50
filenoMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…