Skip to content

Commit

Permalink
Fix pytest condition to include more warning scenarios (#14680)
Browse files Browse the repository at this point in the history
This PR fixes calculation of cond variable in test_corr1d which will include more cases for warnings. This change fixes, 9 pytest failures.
  • Loading branch information
galipremsagar authored Dec 29, 2023
1 parent fd1f986 commit cb09a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/cudf/cudf/tests/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def test_corr1d(data1, data2, method):
# Spearman allows for size 1 samples, but will error if all data in a
# sample is identical since the covariance is zero and so the correlation
# coefficient is not defined.
cond = (is_singular and method == "pearson") or (
cond = ((is_singular or is_identical) and method == "pearson") or (
is_identical and not is_singular and method == "spearman"
)
if method == "spearman":
Expand Down

0 comments on commit cb09a39

Please sign in to comment.