Skip to content

Commit

Permalink
Remove tests that will always fail
Browse files Browse the repository at this point in the history
  • Loading branch information
llrs committed Dec 10, 2023
1 parent 791903b commit 15e9c69
Show file tree
Hide file tree
Showing 50 changed files with 13 additions and 1,462 deletions.
13 changes: 0 additions & 13 deletions tests/testthat/_snaps/collections.md

This file was deleted.

18 changes: 0 additions & 18 deletions tests/testthat/_snaps/premium.md

This file was deleted.

16 changes: 0 additions & 16 deletions tests/testthat/_snaps/search_tweets.md

This file was deleted.

9 changes: 0 additions & 9 deletions tests/testthat/_snaps/timeline.md

This file was deleted.

9 changes: 0 additions & 9 deletions tests/testthat/test-block.R

This file was deleted.

11 changes: 0 additions & 11 deletions tests/testthat/test-clean_tweets.R

This file was deleted.

6 changes: 0 additions & 6 deletions tests/testthat/test-collections.R

This file was deleted.

17 changes: 0 additions & 17 deletions tests/testthat/test-direct_messages.R

This file was deleted.

20 changes: 0 additions & 20 deletions tests/testthat/test-extractors.R

This file was deleted.

56 changes: 0 additions & 56 deletions tests/testthat/test-favorites.R

This file was deleted.

20 changes: 0 additions & 20 deletions tests/testthat/test-followers.R

This file was deleted.

70 changes: 0 additions & 70 deletions tests/testthat/test-friends.R

This file was deleted.

29 changes: 11 additions & 18 deletions tests/testthat/test-geo_objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,43 +80,36 @@ test_that("place works", {
]
},
"attributes": {
}
}
}')
out <- place(exact_location)
expect_s3_class(out, "data.frame")

})


vcr::use_cassette("geo_objects1", {
test_that("coordinates work", {

minimal_coord <- structure(
list(type = "Point",
coordinates = list(c(-85.6445217, 42.9360473))),
list(type = "Point",
coordinates = list(c(-85.6445217, 42.9360473))),
row.names = 45L, class = "data.frame")

expect_error(out <- coordinates(minimal_coord), NA)
expect_equal(nrow(out), 1)
expect_equal(ncol(out), 3)
expect_equal(out$type[1], "Point")
# ids of these "faulty" ids:
ids <- c("1462911176719757313", "1462903173656428545",

# ids of these "faulty" ids:
ids <- c("1462911176719757313", "1462903173656428545",
"1462902964150935558", "1462899130808762371")
# other_ids adjacent (w-1):
other_ids <- c("1462911347801444365", "1462903930090840071",
other_ids <- c("1462911347801444365", "1462903930090840071",
"1462903173656428545", "1462900536848490499")
all_ids <- unique(c(ids, other_ids))
expect_error(lu <- lookup_tweets(all_ids), NA)
expect_equal(length(lu$coordinates), nrow(lu))
expect_equal(ncol(lu$coordinates[[1]]), 3)
expect_named(lu$coordinates[[1]], c("long", "lat", "type"))
# The tweet might have been deleted
if ("1462903173656428545" %in% lu$id_str) {
expect_equal(lu$coordinates[[which(lu$id_str == "1462903173656428545")]]$type, "Point")
}
expect_error(lookup_tweets(all_ids))
})
})
Loading

0 comments on commit 15e9c69

Please sign in to comment.