Skip to content

Commit cb09a39

Browse files
Fix pytest condition to include more warning scenarios (#14680)
This PR fixes calculation of cond variable in test_corr1d which will include more cases for warnings. This change fixes, 9 pytest failures.
1 parent fd1f986 commit cb09a39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/cudf/cudf/tests/test_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def test_corr1d(data1, data2, method):
480480
# Spearman allows for size 1 samples, but will error if all data in a
481481
# sample is identical since the covariance is zero and so the correlation
482482
# coefficient is not defined.
483-
cond = (is_singular and method == "pearson") or (
483+
cond = ((is_singular or is_identical) and method == "pearson") or (
484484
is_identical and not is_singular and method == "spearman"
485485
)
486486
if method == "spearman":

0 commit comments

Comments
 (0)