def test_streaming_dl_manager_download(text_path):
    dl_manager = StreamingDownloadManager()
    out = dl_manager.download(text_path)
    assert out == text_path
    with xopen(out,
               encoding="utf-8") as f, open(text_path,
                                            encoding="utf-8") as expected_file:
        assert f.read() == expected_file.read()
def test_streaming_dl_manager_download(text_path):
    from datasets.utils.streaming_download_manager import StreamingDownloadManager, xopen

    dl_manager = StreamingDownloadManager()
    out = dl_manager.download(text_path)
    assert out == text_path
    with xopen(out,
               encoding="utf-8") as f, open(text_path,
                                            encoding="utf-8") as expected_file:
        assert f.read() == expected_file.read()
def test_streaming_dl_manager_download_dummy_path(urlpath):
    dl_manager = StreamingDownloadManager()
    assert dl_manager.download(urlpath) == urlpath
def test_streaming_dl_manager_download_dummy_path(urlpath):
    from datasets.utils.streaming_download_manager import StreamingDownloadManager

    dl_manager = StreamingDownloadManager()
    assert dl_manager.download(urlpath) == urlpath