Skip to content

Commit

Permalink
little error in test caused by a bad argument
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGelb committed Nov 7, 2023
1 parent 808a2cc commit 893d16e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/testthat/test_knn_sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ test_that("Testing the knn function with a simple case and a directed network",
)

## calculating the realvalues
mats <- network_knn(origins = event, lines = all_lines, k = 3, maxdistance = 100, direction = "dir")
mats <- network_knn(origins = event,
lines = all_lines,
k = 2,
maxdistance = 100,
direction = "dir")
test1 <- sum(mats[[1]] != exp_dist)
test2 <- sum(mats[[2]] != exp_oid)
expect_true(test1 == 0 & test2 == 0)
Expand Down

0 comments on commit 893d16e

Please sign in to comment.