(self)
| 172 | @unittest.skipIf(platform.system() == "AIX", "AIX returns PermissionError") |
| 173 | @requires_subprocess() |
| 174 | def test_lockf_exclusive(self): |
| 175 | self.f = open(TESTFN, 'wb+') |
| 176 | cmd = fcntl.LOCK_EX | fcntl.LOCK_NB |
| 177 | fcntl.lockf(self.f, cmd) |
| 178 | mp = multiprocessing.get_context('spawn') |
| 179 | p = mp.Process(target=try_lockf_on_other_process_fail, args=(TESTFN, cmd)) |
| 180 | p.start() |
| 181 | p.join() |
| 182 | fcntl.lockf(self.f, fcntl.LOCK_UN) |
| 183 | self.assertEqual(p.exitcode, 0) |
| 184 | |
| 185 | @unittest.skipIf(platform.system() == "AIX", "AIX returns PermissionError") |
| 186 | @requires_subprocess() |
nothing calls this directly
no test coverage detected