File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
tests/unit/butterfree/clients Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def read(
58
58
"""
59
59
if not isinstance (format , str ):
60
60
raise ValueError ("format needs to be a string with the desired read format" )
61
- if not isinstance (path , (str , list )):
61
+ if path and not isinstance (path , (str , list )):
62
62
raise ValueError ("path needs to be a string or a list of string" )
63
63
64
64
df_reader : Union [
@@ -67,7 +67,7 @@ def read(
67
67
68
68
df_reader = df_reader .schema (schema ) if schema else df_reader
69
69
70
- return df_reader .format (format ).load (path , ** options ) # type: ignore
70
+ return df_reader .format (format ).load (path = path , ** options ) # type: ignore
71
71
72
72
def read_table (self , table : str , database : str = None ) -> DataFrame :
73
73
"""Use the SparkSession.read interface to read a metastore table.
Original file line number Diff line number Diff line change 1
1
from setuptools import find_packages , setup
2
2
3
3
__package_name__ = "butterfree"
4
- __version__ = "1.2.0.dev9 "
4
+ __version__ = "1.2.0.dev10 "
5
5
__repository_url__ = "https://github.com/quintoandar/butterfree"
6
6
7
7
with open ("requirements.txt" ) as f :
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ def test_read(
65
65
66
66
# assert
67
67
mocked_spark_read .format .assert_called_once_with (format )
68
- mocked_spark_read .load .assert_called_once_with (path , ** options )
68
+ mocked_spark_read .load .assert_called_once_with (path = path , ** options )
69
69
assert target_df .collect () == result_df .collect ()
70
70
71
71
@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments