This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace custom assert fns with pandas'
- Loading branch information
Showing
3 changed files
with
15 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +0,0 @@ | ||
from numpy.testing import assert_array_equal | ||
|
||
|
||
def assert_nested_array_series_equal(a, b): | ||
assert_array_equal(a.index, b.index) | ||
for inner_a, inner_b in zip(a, b): | ||
assert_array_equal(inner_a, inner_b, err_msg=f"Series '{a.name}' is not equal series '{b.name}'") | ||
|
||
|
||
def assert_df_equal(a, b): | ||
assert_array_equal(a.index, b.index) | ||
assert_array_equal(a.columns, b.columns) | ||
assert_array_equal(a.dtypes, b.dtypes) | ||
for column in a.columns: | ||
assert_array_equal(a[column], b[column], err_msg=f"Column '{column}' is not equal column '{column}'") | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters