Skip to content

Commit 579ecbc

Browse files
authored
fixing tests
1 parent d9bf2a5 commit 579ecbc

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 0.7.10
44
* Fix a bug in `model_utils.metric_graph`
5+
* Fix failing tests
56

67
## 0.7.9
78
* Fixing `nominal.associations(plot=False)` not working as expected on Jupyter-based notebooks (issues [#167](https://github.com/shakedzy/dython/issues/167) & [#168](https://github.com/shakedzy/dython/issues/168))

tests/test_nominal/test_associations.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ def test_datetime_data():
122122
data=[[1.0, 1.0, -1.0], [1.0, 1.0, -1.0], [-1.0, -1.0, 1.0]],
123123
)
124124
corr = associations(df, plot=False)["corr"]
125-
assert corr.compare(
126-
correct_corr
127-
).empty, f"datetime associations are incorrect. Test should have returned an empty dataframe, received: {corr.head()}"
125+
assert np.allclose(corr, correct_corr, atol=1e-10, rtol=1e-10), \
126+
f"datetime associations are incorrect. Test should have returned an empty dataframe, received: {corr.head()}"
128127

129128

130129
def test_category_nan_replace(iris_df):

tests/test_nominal/test_associations_parallel.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,5 @@ def test_datetime_data():
154154
corr = associations(
155155
df, plot=False, multiprocessing=True, max_cpu_cores=MAX_CORE_COUNT
156156
)["corr"]
157-
assert corr.compare(
158-
correct_corr
159-
).empty, f"datetime associations are incorrect. Test should have returned an empty dataframe, received: {corr.head()}"
157+
assert np.allclose(corr, correct_corr, atol=1e-10, rtol=1e-10), \
158+
f"datetime associations are incorrect. Test should have returned an empty dataframe, received: {corr.head()}"

0 commit comments

Comments
 (0)