Skip to content

Commit

Permalink
Fix tests and address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pvk-developer committed Apr 25, 2024
1 parent ad0fab9 commit 52e9fb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions sdv/io/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def read(self, folder_name, file_names=None):
encoding=self.encoding,
parse_dates=False,
low_memory=False,
decimal=self.decimal
decimal=self.decimal,
on_bad_lines='warn'
)

metadata = self._infer_metadata(data)
Expand Down Expand Up @@ -168,5 +169,5 @@ def write(self, synthetic_data, folder_name, file_name_suffix=None, mode='x'):
encoding=self.encoding,
index=False,
float_format=self.float_format,
mode=mode
mode=mode,
)
2 changes: 1 addition & 1 deletion tests/unit/io/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_write_file_exists(self, tmpdir):
handler = CSVHandler()

# Run
error_msg = re.escape(f"{tmpdir / 'synthetic_data' / 'table1.csv'}")
error_msg = re.escape(f"{FileExistsError(tmpdir / 'synthetic_data' / 'table1.csv')}")
with pytest.raises(FileExistsError, match=error_msg):
handler.write(synthetic_data, tmpdir / 'synthetic_data')

Expand Down

0 comments on commit 52e9fb9

Please sign in to comment.