def test_untar_command_bsd(self) -> None: output_path = "test_output_path" self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=False, verbose=False), ["tar", "-C", output_path, "-xzpf", "-"], ) self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=False, verbose=True), ["tar", "-C", output_path, "-xzpfv", "-"], )
def test_untar_command_bsd(self) -> None: output_path = "test_output_path" self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=False, verbose=False), f"tar -C '{output_path}' -xzpf -", ) self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=False, verbose=True), f"tar -C '{output_path}' -xzpfv -", )
def test_untar_command_gnu(self) -> None: output_path = "test_output_path" self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=True, verbose=False), f"tar -C '{output_path}' --warning=no-unknown-keyword -xzpf -", ) self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=True, verbose=True), f"tar -C '{output_path}' -xzpfv -", )
def test_untar_command_gnu(self) -> None: output_path = "test_output_path" self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=True, verbose=False), [ "tar", "-C", output_path, "--warning=no-unknown-keyword", "-xzpf", "-" ], ) self.assertEqual( _create_untar_command(output_path=output_path, gnu_tar=True, verbose=True), ["tar", "-C", output_path, "-xzpfv", "-"], )