(self, n)
| 3937 | badfd = -0x5555 |
| 3938 | |
| 3939 | def newFDs(self, n): |
| 3940 | # Return a list of n file descriptors for newly-created files |
| 3941 | # containing their list indices as ASCII numbers. |
| 3942 | fds = [] |
| 3943 | for i in range(n): |
| 3944 | fd, path = tempfile.mkstemp() |
| 3945 | self.addCleanup(os.unlink, path) |
| 3946 | self.addCleanup(os.close, fd) |
| 3947 | os.write(fd, str(i).encode()) |
| 3948 | fds.append(fd) |
| 3949 | return fds |
| 3950 | |
| 3951 | def checkFDs(self, fds): |
| 3952 | # Check that the file descriptors in the given list contain |
no test coverage detected