def test__read_file_not_found(provider_config, provider_name, file_path, file_format): client = Client(dataset_name="output", format=file_format, url=file_path, provider=provider_config(provider_name)) with pytest.raises(FileNotFoundError): next(client.read())
def test__read_from_private_ssh(provider_config, provider_name, file_path, file_format): client = Client(dataset_name="output", format=file_format, url=file_path, provider=provider_config(provider_name)) result = next(client.read()) assert result == { "header1": "text", "header2": 1, "header3": 0.2, "header4": True }
def check_read(config, expected_columns=10, expected_rows=42): client = Client(**config) rows = list(client.read()) assert len(rows) == expected_rows assert len(rows[0]) == expected_columns