(self, n)
| 4040 | badfd = -0x5555 |
| 4041 | |
| 4042 | def newFDs(self, n): |
| 4043 | # Return a list of n file descriptors for newly-created files |
| 4044 | # containing their list indices as ASCII numbers. |
| 4045 | fds = [] |
| 4046 | for i in range(n): |
| 4047 | fd, path = tempfile.mkstemp() |
| 4048 | self.addCleanup(os.unlink, path) |
| 4049 | self.addCleanup(os.close, fd) |
| 4050 | os.write(fd, str(i).encode()) |
| 4051 | fds.append(fd) |
| 4052 | return fds |
| 4053 | |
| 4054 | def checkFDs(self, fds): |
| 4055 | # Check that the file descriptors in the given list contain |
no test coverage detected