Expected `runtime["user.self"]` <= `2.5 * runtime["elapsed"]`.
Actual comparison: 0.0300 > 0.0250
Difference: 0.0050 > 0

make_expected <- function(rows, name_y) {
testthat::test_that("Inner join is correct for Levenshtein", {
name_y = c("Olive", "Jams", "Emma", "Smelia")
testthat::test_that("Inner join is correct for Hamming", {
testthat::test_that("Inner join is correct for LCS", {
expected <- make_expected(c(3, 5, 7), c("Olive", "Jams", "Emma"))
testthat::test_that("Inner join is correct for QGram", {
expected <- make_expected(c(3, 7), c("Olive", "Emma"))
testthat::test_that("Inner join is correct for Cosine", {
c("Olive", "Oliv HEE-YAH", "Jams", "Olive", "Oliv HEE-YAH", "Emma", "Smelia")
testthat::test_that("Inner join is correct for Jaccard", {
testthat::test_that("Inner join is correct for Jaro-Winkler", {
c("Laim", "No, ahhh", "Olive", "Jams", "Olive", "Emma", "Smelia")
testthat::test_that("Inner join is correct for OSA", {
c("Laim", "Olive", "Jams", "Emma", "Smelia")
testthat::test_that("Non-strings throw an error", {
by = list("year" = "Name"), method = "hamming",
testthat::test_that("Invalid columns throw error", {
by = list("DoesNotExist" = "Name"), method = "hamming",
testthat::test_that("Multi column joins work", {
Name = c("Oliver", "James", "Emma", "Amelia"),
Pet = c("Sparky", "Spike", "Fido", "Bingo")
Name = c("Olive", "Jams", "Emma", "Smelia"),
Pet = c("Sparky", "Spike", "Fuselage", "Bongo")
Name.x = c("Oliver", "James", "Amelia"),
by = list("Name" = "Name", "Pet" = "Pet"),
testthat::test_that("nthread argument works for unnormalized edit distances", {
# The runtime is so small that false positives will pop up.
# Need to artificially inflate the test DF size.
unnorm_methods <- c("hamming", "osa", "dl", "lcs", "lv")
do.call(rbind, replicate(10, test_df, simplify = FALSE)),
testthat::test_that("nthread argument works for normalized edit distances", {
testthat::test_that("nthread argument works for qgram edit distances", {
norm_methods <- c("cosine", "jaccard", "qgram")

"Inner join is correct for Jaro-Winkler"
"nthread argument works for unnormalized edit distances"
"nthread argument works for normalized edit distances"
"nthread argument works for qgram edit distances"

nthread argument works for unnormalized edit distances