diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-06-29 10:58:57 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-06-29 10:58:57 (GMT) |
commit | 3a5053b8cfde6cb439384e79554c431fe0a649e8 (patch) | |
tree | f20681058747196480d1660c3fb4e70ca5ebdc33 | |
parent | a92bfa457cd35443c340fa9931055899bab2b618 (diff) | |
download | cpython-3a5053b8cfde6cb439384e79554c431fe0a649e8.zip cpython-3a5053b8cfde6cb439384e79554c431fe0a649e8.tar.gz cpython-3a5053b8cfde6cb439384e79554c431fe0a649e8.tar.bz2 |
Issue #18322: fix some test_stat nits.
-rw-r--r-- | Lib/test/test_stat.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Lib/test/test_stat.py b/Lib/test/test_stat.py index be0c5c5..af6ced4 100644 --- a/Lib/test/test_stat.py +++ b/Lib/test/test_stat.py @@ -1,11 +1,11 @@ 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() |