Skip to content

Conversation

@molpopgen
Copy link
Member

Move code into a testing module that is hopefully nicely-organized.

@molpopgen
Copy link
Member Author

@laggycomputer -- there are several things to note here:

  1. I dropped 2 dependencies. The matrix to calculate pi can serve as an alternate implementation but it would be a second naive implementation in addition to what we already have.
  2. Some of the tests can be removed as they are made moot by comparison to naive impls. I will note these in comments via GitHub.
  3. The test.rs file can ultimately be deleted but it is currently still there so that commented-out code can be seen in review.

use crate::MultiSiteCounts;

#[test]
fn watterson_theta() {
Copy link
Member Author

Choose a reason for hiding this comment

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

This test is moot given the two below and can be deleted.

@laggycomputer

// once we have a naive implementation in place
// and can test using our random data API.
#[test]
fn tajima_d() {
Copy link
Member Author

Choose a reason for hiding this comment

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

This test will be replaced by comparisons to naive impls but should be left for now.

@laggycomputer

use std::iter::repeat_n;

#[test]
fn load_raw() {
Copy link
Member Author

Choose a reason for hiding this comment

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

We can probably come up with a version of this that uses our testdata mod, but that would be a later PR.

@laggycomputer
Copy link
Collaborator

Took a look at the commented out pi test(s), figured we want to remove that quickly. We can proceed with deleting that.

@molpopgen
Copy link
Member Author

Took a look at the commented out pi test(s), figured we want to remove that quickly. We can proceed with deleting that.

@laggycomputer -- you mean the one in test.rs? If so, that should be removed. The intent is to remove commented out code unless you have an objection at this point. We can actually delete all of test.rs.

@molpopgen molpopgen marked this pull request as ready for review December 17, 2025 19:26
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.

test code reorganization

3 participants