diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-07 08:06:39 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-07 08:06:39 (GMT) |
commit | 5cfc79deaeabf4af3c767665098a37da9f375eda (patch) | |
tree | 2696e5c9674d11398f0d207d58d1fcdd3ee420eb /Lib/test/test_fileio.py | |
parent | fe4ef392d5df73639337f02db2ad8100d615067d (diff) | |
download | cpython-5cfc79deaeabf4af3c767665098a37da9f375eda.zip cpython-5cfc79deaeabf4af3c767665098a37da9f375eda.tar.gz cpython-5cfc79deaeabf4af3c767665098a37da9f375eda.tar.bz2 |
Issue #20532: Tests which use _testcapi now are marked as CPython only.
Diffstat (limited to 'Lib/test/test_fileio.py')
-rw-r--r-- | Lib/test/test_fileio.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py index a6853a1..444be91 100644 --- a/Lib/test/test_fileio.py +++ b/Lib/test/test_fileio.py @@ -8,9 +8,8 @@ import unittest from array import array from weakref import proxy from functools import wraps -import _testcapi -from test.support import TESTFN, check_warnings, run_unittest, make_bad_fd +from test.support import TESTFN, check_warnings, run_unittest, make_bad_fd, cpython_only from collections import UserList from _io import FileIO as _FileIO @@ -362,7 +361,11 @@ class OtherFileTests(unittest.TestCase): if sys.platform == 'win32': import msvcrt self.assertRaises(IOError, msvcrt.get_osfhandle, make_bad_fd()) + + @cpython_only + def testInvalidFd_overflow(self): # Issue 15989 + import _testcapi self.assertRaises(TypeError, _FileIO, _testcapi.INT_MAX + 1) self.assertRaises(TypeError, _FileIO, _testcapi.INT_MIN - 1) |