(self)
| 118 | |
| 119 | @cpython_only |
| 120 | def test_fcntl_bad_file_overflow(self): |
| 121 | _testcapi = import_module("_testcapi") |
| 122 | INT_MAX = _testcapi.INT_MAX |
| 123 | INT_MIN = _testcapi.INT_MIN |
| 124 | # Issue 15989 |
| 125 | with self.assertRaises(OverflowError): |
| 126 | fcntl.fcntl(INT_MAX + 1, fcntl.F_SETFL, os.O_NONBLOCK) |
| 127 | with self.assertRaises(OverflowError): |
| 128 | fcntl.fcntl(BadFile(INT_MAX + 1), fcntl.F_SETFL, os.O_NONBLOCK) |
| 129 | with self.assertRaises(OverflowError): |
| 130 | fcntl.fcntl(INT_MIN - 1, fcntl.F_SETFL, os.O_NONBLOCK) |
| 131 | with self.assertRaises(OverflowError): |
| 132 | fcntl.fcntl(BadFile(INT_MIN - 1), fcntl.F_SETFL, os.O_NONBLOCK) |
| 133 | |
| 134 | @unittest.skipIf( |
| 135 | (platform.machine().startswith("arm") and platform.system() == "Linux") |
nothing calls this directly
no test coverage detected