Skip to content

Commit

Permalink
chore; updating test_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KevenDuverglas committed Dec 1, 2023
1 parent 015398b commit ba77242
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion cellveyor/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def access_dataframes(spreadsheet_file: Path) -> Dict[str, pandas.DataFrame]:
name_to_dataframe_dict = pandas.read_excel(spreadsheet_file, sheet_name=None)
return name_to_dataframe_dict


def key_attribute_column_filter(
sheet_dataframe: pandas.DataFrame,
key_attribute_name: str,
Expand Down
Binary file added spreadsheets/example_spreadsheet.xlsx
Binary file not shown.
12 changes: 5 additions & 7 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@


def test_access_dataframes() -> None:
spreadsheet_file = "spreadsheets/fake_spreadsheet.xlsx"
result = data.access_dataframes(spreadsheet_file)
expected_sheet1 = pd.DataFrame({'column1': [1, 2, 3], 'column2': ['A', 'B', 'C']})
expected_sheet2 = pd.DataFrame({'columnA': [4, 5, 6], 'columnB': ['X', 'Y', 'Z']})

assert pd.DataFrame.equals(result['Sheet1'], expected_sheet1)
assert pd.DataFrame.equals(result['Sheet2'], expected_sheet2)
spreadsheet_file_one = "spreadsheets/fake_spreadsheet.xlsx"
spreadsheet_file_two = "spreadsheets/example_spreadsheet.xlsx"
test_one= data.access_dataframes(spreadsheet_file_one)
test_two = data.access_dataframes(spreadsheet_file_two)
assert test_one != test_two

0 comments on commit ba77242

Please sign in to comment.