Commit 3a5053b8 authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #18322: fix some test_stat nits.

parent a92bfa45
import unittest
import os
from test.support import TESTFN, run_unittest, import_fresh_module
from test.support import TESTFN, import_fresh_module
c_stat = import_fresh_module('stat', fresh=['_stat'])
py_stat = import_fresh_module('stat', blocked=['_stat'])
class TestFilemode(unittest.TestCase):
class TestFilemode:
statmod = None
file_flags = {'SF_APPEND', 'SF_ARCHIVED', 'SF_IMMUTABLE', 'SF_NOUNLINK',
......@@ -186,21 +186,17 @@ class TestFilemode(unittest.TestCase):
self.assertEqual(func(0), 0)
class TestFilemodeCStat(TestFilemode):
class TestFilemodeCStat(TestFilemode, unittest.TestCase):
statmod = c_stat
formats = TestFilemode.formats | {'S_IFDOOR', 'S_IFPORT', 'S_IFWHT'}
format_funcss = TestFilemode.format_funcs | {'S_ISDOOR', 'S_ISPORT',
'S_ISWHT'}
format_funcs = TestFilemode.format_funcs | {'S_ISDOOR', 'S_ISPORT',
'S_ISWHT'}
class TestFilemodePyStat(TestFilemode):
class TestFilemodePyStat(TestFilemode, unittest.TestCase):
statmod = py_stat
def test_main():
run_unittest(TestFilemodeCStat)
run_unittest(TestFilemodePyStat)
if __name__ == '__main__':
test_main()
unittest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment