mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-38109: Add missing constants to Lib/stat.py (GH-16665)
Add missing stat.S_IFDOOR, stat.S_IFPORT, stat.S_IFWHT, stat.S_ISDOOR, stat.S_ISPORT, and stat.S_ISWHT values to the Python implementation of the stat module.
This commit is contained in:
parent
a5447735c3
commit
7bb14316b8
3 changed files with 21 additions and 6 deletions
|
@ -16,10 +16,10 @@ class TestFilemode:
|
|||
'UF_IMMUTABLE', 'UF_NODUMP', 'UF_NOUNLINK', 'UF_OPAQUE'}
|
||||
|
||||
formats = {'S_IFBLK', 'S_IFCHR', 'S_IFDIR', 'S_IFIFO', 'S_IFLNK',
|
||||
'S_IFREG', 'S_IFSOCK'}
|
||||
'S_IFREG', 'S_IFSOCK', 'S_IFDOOR', 'S_IFPORT', 'S_IFWHT'}
|
||||
|
||||
format_funcs = {'S_ISBLK', 'S_ISCHR', 'S_ISDIR', 'S_ISFIFO', 'S_ISLNK',
|
||||
'S_ISREG', 'S_ISSOCK'}
|
||||
'S_ISREG', 'S_ISSOCK', 'S_ISDOOR', 'S_ISPORT', 'S_ISWHT'}
|
||||
|
||||
stat_struct = {
|
||||
'ST_MODE': 0,
|
||||
|
@ -231,10 +231,6 @@ class TestFilemode:
|
|||
class TestFilemodeCStat(TestFilemode, unittest.TestCase):
|
||||
statmod = c_stat
|
||||
|
||||
formats = TestFilemode.formats | {'S_IFDOOR', 'S_IFPORT', 'S_IFWHT'}
|
||||
format_funcs = TestFilemode.format_funcs | {'S_ISDOOR', 'S_ISPORT',
|
||||
'S_ISWHT'}
|
||||
|
||||
|
||||
class TestFilemodePyStat(TestFilemode, unittest.TestCase):
|
||||
statmod = py_stat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue