| 451 | |
| 452 | @pytest.mark.skipif(IS_WINDOWS_PLATFORM, reason='No UNIX sockets on Win32') |
| 453 | def test_tar_socket_file(self): |
| 454 | base = tempfile.mkdtemp() |
| 455 | self.addCleanup(shutil.rmtree, base) |
| 456 | for d in ['foo', 'bar']: |
| 457 | os.makedirs(os.path.join(base, d)) |
| 458 | sock = socket.socket(socket.AF_UNIX) |
| 459 | self.addCleanup(sock.close) |
| 460 | sock.bind(os.path.join(base, 'test.sock')) |
| 461 | with tar(base) as archive: |
| 462 | tar_data = tarfile.open(fileobj=archive) |
| 463 | assert sorted(tar_data.getnames()) == ['bar', 'foo'] |
| 464 | |
| 465 | def tar_test_negative_mtime_bug(self): |
| 466 | base = tempfile.mkdtemp() |