Skip to content

Commit

Permalink
skip tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattansb committed Mar 21, 2022
1 parent cc37dd6 commit eae864c
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/testthat/test-chatch_em.R
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
context("chtrs")

test_that("chtrs", {
testthat::skip_on_cran()
skip_on_cran()
skip_if_not(interactive())

library(cheatR)
my_files <- list.files(path = '../../man/files', pattern = '.doc', full.names = T)
# my_files <- list.files(path = 'man/files', pattern = '.doc', full.names = T)
# my_files <- list.files(path = '../../man/files', pattern = '.doc', full.names = TRUE)
my_files <- list.files(path = 'man/files', pattern = '.doc', full.names = TRUE)
# my_files

set.seed(140)
results <- catch_em(flist = my_files,
n_grams = 10, time_lim = 1)

testthat::expect_is(results, "chtrs")
testthat::expect_is(results, "matrix")
testthat::expect_true(all(diag(results) == 1))
testthat::expect_true(all(is.na(results[upper.tri(results)])))
testthat::expect_equal(results[lower.tri(results)],
c(0.872, 0.901, 0.002, 0.877, 0.002, 0.001),
tol = .001)
expect_is(results, "chtrs")
expect_is(results, "matrix")
expect_true(all(diag(results) == 1))
expect_true(all(is.na(results[upper.tri(results)])))
expect_equal(results[lower.tri(results)],
c(0.872, 0.901, 0.002, 0.877, 0.002, 0.001),
tol = .001)

# plot(results, remove_lonely = F)
# summary(results)
Expand Down

0 comments on commit eae864c

Please sign in to comment.