pypy.module.fcntl.test.apptest_fcntl:test_constants
def test_constants():
assert isinstance(fcntl.FASYNC, int)
assert isinstance(fcntl.F_DUPFD_CLOEXEC, int)
# open file description locks (linux >= 3.15, macOS)
if sys.platform == 'darwin' or sys.platform.startswith('linux'):
assert isinstance(fcntl.F_OFD_GETLK, int)
assert isinstance(fcntl.F_OFD_SETLK, int)
assert isinstance(fcntl.F_OFD_SETLKW, int)
if sys.platform == 'darwin':
assert fcntl.F_FULLFSYNC == 51
assert fcntl.F_NOCACHE == 48
assert fcntl.F_GETPATH == 50
else:
assert not hasattr(fcntl, 'F_FULLFSYNC')
assert not hasattr(fcntl, 'F_NOCACHE')
if sys.platform.startswith('linux'):
for name in ['F_GETPIPE_SZ', 'F_SETPIPE_SZ', 'F_ADD_SEALS',
'F_GET_SEALS', 'F_SEAL_SEAL', 'F_SEAL_SHRINK',
'F_SEAL_GROW', 'F_SEAL_WRITE']:
> assert isinstance(getattr(fcntl, name), int), name
E AttributeError: module 'fcntl' has no attribute 'F_ADD_SEALS'
../build/pypy/module/fcntl/test/apptest_fcntl.py:44: AttributeError
builder: pypy-c-jit-linux-x86-32 build #8447+
test: pypy.module.fcntl.test.apptest_fcntl:test_constants