(self, filename)
| 102 | # The '_test' functions 'entry points with params' - ie, what the |
| 103 | # top-level 'test' functions would be if they could take params |
| 104 | def _test_single(self, filename): |
| 105 | remove_if_exists(filename) |
| 106 | create_empty_file(filename) |
| 107 | try: |
| 108 | self._do_single(filename) |
| 109 | finally: |
| 110 | os.unlink(filename) |
| 111 | self.assertTrue(not os.path.exists(filename)) |
| 112 | # and again with os.open. |
| 113 | f = os.open(filename, os.O_CREAT | os.O_WRONLY) |
| 114 | os.close(f) |
| 115 | try: |
| 116 | self._do_single(filename) |
| 117 | finally: |
| 118 | os.unlink(filename) |
| 119 | |
| 120 | # The 'test' functions are unittest entry points, and simply call our |
| 121 | # _test functions with each of the filename combinations we wish to test |
no test coverage detected