Skip to content

Commit 3f1c907

Browse files
committed
speed up the integration test for branch lengths
1 parent 45e9ea5 commit 3f1c907

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/haploid_wright_fisher.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ proptest! {
114114
#[test]
115115
fn test_simulate_proptest(seed in any::<u64>(),
116116
num_generations in 50..100i32,
117-
simplify_interval in 1..100i32 ) {
117+
simplify_interval in 1..100i32) {
118118
let ts = simulate(seed, 100, num_generations, simplify_interval).unwrap();
119119

120120
// stress test the branch length fn b/c it is not a trivial
@@ -123,7 +123,8 @@ proptest! {
123123
use streaming_iterator::StreamingIterator;
124124
let mut x = f64::NAN;
125125
if let Ok(mut tree_iter) = ts.tree_iterator(0) {
126-
while let Some(tree) = tree_iter.next() {
126+
// We will only do the first tree to save time.
127+
if let Some(tree) = tree_iter.next() {
127128
let b = tree.total_branch_length(false).unwrap();
128129
let b2 = unsafe {
129130
tskit::bindings::tsk_tree_get_total_branch_length(tree.as_ptr(), -1, &mut x)

0 commit comments

Comments
 (0)