def test_streaming_gg_drive_zipped():
    urlpath = StreamingDownloadManager().download_and_extract(
        TEST_GG_DRIVE_ZIPPED_URL)
    all_files = list(xglob(xjoin(urlpath, "*")))
    assert len(all_files) == 1
    assert xbasename(all_files[0]) == TEST_GG_DRIVE_FILENAME
    with xopen(all_files[0]) as f:
        assert f.read() == TEST_GG_DRIVE_CONTENT
def test_xjoin(input_path, paths_to_join, expected_path):
    output_path = xjoin(input_path, *paths_to_join)
    output_path = _readd_double_slash_removed_by_path(
        Path(output_path).as_posix())
    assert output_path == _readd_double_slash_removed_by_path(
        Path(expected_path).as_posix())
    output_path = xpathjoin(Path(input_path), *paths_to_join)
    assert output_path == Path(expected_path)
def test_streaming_dl_manager_download_and_extract_with_join(
        input_path, filename, expected_path):
    dl_manager = StreamingDownloadManager()
    extracted_path = dl_manager.download_and_extract(input_path)
    output_path = xjoin(extracted_path, filename)
    assert output_path == expected_path