(self, name)
| 256 | @unittest.skipUnless(hasattr(os, "getuid") and hasattr(os, "getgid"), |
| 257 | "Missing getuid or getgid implementation") |
| 258 | def add_dir_and_getmember(self, name): |
| 259 | def filter(tarinfo): |
| 260 | tarinfo.uid = tarinfo.gid = 100 |
| 261 | return tarinfo |
| 262 | |
| 263 | with os_helper.temp_cwd(): |
| 264 | with tarfile.open(tmpname, 'w') as tar: |
| 265 | tar.format = tarfile.USTAR_FORMAT |
| 266 | try: |
| 267 | os.mkdir(name) |
| 268 | tar.add(name, filter=filter) |
| 269 | finally: |
| 270 | os.rmdir(name) |
| 271 | with tarfile.open(tmpname) as tar: |
| 272 | self.assertEqual( |
| 273 | tar.getmember(name), |
| 274 | tar.getmember(name + '/') |
| 275 | ) |
| 276 | |
| 277 | class GzipUstarReadTest(GzipTest, UstarReadTest): |
| 278 | pass |
no test coverage detected