Skip to content

Conditional unit tests for CI tests#173

Merged
Hiddentale merged 15 commits into
developmentfrom
conditional_unit_tests.rs
May 15, 2026
Merged

Conditional unit tests for CI tests#173
Hiddentale merged 15 commits into
developmentfrom
conditional_unit_tests.rs

Conversation

@ayca12111
Copy link
Copy Markdown

@ayca12111 ayca12111 commented May 8, 2026

Description

Conditional unit tests for CI tests

Related Issues

Too many variables named a single letter. -> Solved by '#[allow(clippy::many_single_char_names)]'

Type of Change

  • Bug fix
  • New feature

Checklist

  • I ran cargo fmt --all (code is formatted)
  • I ran cargo clippy --workspace --all-targets -- -D warnings (no warnings)
  • I ran cargo test --workspace (all tests pass)
  • I added tests for new functionality

@ayca12111 ayca12111 requested a review from Hiddentale as a code owner May 8, 2026 09:08
@tehinator tehinator self-requested a review May 8, 2026 10:04
let (p, stat, dof) = unwrap_correlated(&t.run_test(x, y, z, false, 0.05).unwrap());
assert!(stat.abs() < 1e-9, "stat should be ~0, got {stat}");
assert!(p > 0.99);
//dof = (#Z strata) * (|X|-1)(|Y|-1): 2 * 1 * 1 = 2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this here?

let y = array![1., 2., 1., 2., 1., 2., 1., 2.];
let z = array![[1.], [1.], [1.], [1.], [2.], [2.], [2.], [2.]];

let (p, stat, dof) = unwrap_correlated(&t.run_test(x, y, z, false, 0.05).unwrap());
Copy link
Copy Markdown

@tehinator tehinator May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false, 0.05 no longer needed in current version, this is wrong throughout the entire pull request

Copy link
Copy Markdown

@tehinator tehinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, aside from the issues related to not having pulled the lastest commit from development

Copy link
Copy Markdown
Contributor

@Hiddentale Hiddentale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

Modified likelihood's "cond_bool_rejects_independent" test passes successfully, but not because the test is correct.

The error is silently swallowed by power divergence's continue statement. Nevertheless, this is not something to fix for this specific task. I've added the issue for a future task.

@Hiddentale Hiddentale merged commit 514c5f5 into development May 15, 2026
5 checks passed
@Hiddentale Hiddentale deleted the conditional_unit_tests.rs branch May 15, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants