Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Feb 5, 2025
1 parent 56c0d97 commit def72c3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/sources/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ def _convert_bytea_to_hex(df: DataFrame) -> DataFrame:
for column in df.columns:
if isinstance(df[column].iloc[0], memoryview):
df[column] = df[column].apply(lambda x: f"0x{x.tobytes().hex()}")
# if isinstance(df[column].iloc[0], list):
# # Check if the list contains memoryview objects
# if all(isinstance(item, memoryview) for item in df[column].iloc[0]):
# df[column] = df[column].apply(lambda lst: [f"0x{item.tobytes().hex()}" for item in lst])
return df


Expand Down
7 changes: 0 additions & 7 deletions tests/unit/sources_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@ def test_convert_dict_to_json(self):
None,
]

# Assert list of dictionaries was converted
assert result["list_dict"].tolist() == [
'[{"x": 1}, {"y": 2}]',
None,
'[{"z": 3}]',
]

# Assert normal column remains unchanged
assert result["normal_col"].tolist() == [1, 2, 3]

Expand Down

0 comments on commit def72c3

Please sign in to comment.