Skip to content

Commit dda8bac

Browse files
committed
removed skip_on_ci()s
1 parent 1c1eba5 commit dda8bac

10 files changed

+0
-48
lines changed

tests/testthat/test-api-bugs.R

-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ add_base_url <- function(x) {
1010

1111
test_that("there is trouble paging", {
1212
skip_on_cran()
13-
skip_on_ci()
1413

1514
# reprex inspired by https://patentsview.org/forum/7/topic/812
1615
# Not all requested groups are coming back as we page, causing
@@ -55,7 +54,6 @@ test_that("there is trouble paging", {
5554

5655
test_that("there is case sensitivity on string equals", {
5756
skip_on_cran()
58-
skip_on_ci()
5957

6058
# reported to the API team PVS-1147
6159
# not sure if this is a bug or feature - original API was case insensitive
@@ -80,7 +78,6 @@ test_that("there is case sensitivity on string equals", {
8078

8179
test_that("string vs text operators behave differently", {
8280
skip_on_cran()
83-
skip_on_ci()
8481

8582
# # reported to the API team PVS-1147
8683
query <- qry_funs$begins(assignee_organization = "johnson")
@@ -96,7 +93,6 @@ test_that("string vs text operators behave differently", {
9693

9794
test_that("API returns all requested groups", {
9895
skip_on_cran()
99-
skip_on_ci()
10096

10197
# can we traverse the return building a list of fields?
10298
# sort both requested fields and returned ones to see if they are equal
@@ -162,7 +158,6 @@ eps <- (get_endpoints())
162158

163159
test_that("We can call all the legitimate HATEOAS endpoints", {
164160
skip_on_cran()
165-
skip_on_ci()
166161

167162
# these currently throw Error: Internal Server Error
168163
broken_single_item_queries <- c(
@@ -184,7 +179,6 @@ test_that("We can call all the legitimate HATEOAS endpoints", {
184179

185180
test_that("individual fields are still broken", {
186181
skip_on_cran()
187-
skip_on_ci()
188182

189183
# Sample fields that cause 500 errors when requested by themselves.
190184
# Some don't throw errors when included in get_fields() but they do if
@@ -210,7 +204,6 @@ test_that("individual fields are still broken", {
210204

211205
test_that("we can't sort by all fields", {
212206
skip_on_cran()
213-
skip_on_ci()
214207

215208
# PVS-1377
216209
sorts_to_try <- c(
@@ -254,7 +247,6 @@ test_that("we can't sort by all fields", {
254247

255248
test_that("withdrawn patents are still present in the database", {
256249
skip_on_cran()
257-
skip_on_ci()
258250

259251
# PVS-1342 Underlying data issues
260252
# There are 8,000 patents that were in the bulk xml files patentsiew is based on.
@@ -276,7 +268,6 @@ test_that("withdrawn patents are still present in the database", {
276268

277269
test_that("missing patents are still missing", {
278270
skip_on_cran()
279-
skip_on_ci()
280271

281272
# PVS-1342 Underlying data issues
282273
# There are around 300 patents that aren't in the bulk xml files patentsiew is based on.
@@ -297,7 +288,6 @@ test_that("missing patents are still missing", {
297288

298289
test_that("we can't explicitly request assignee_ or inventor_years.num_patents", {
299290
skip_on_cran()
300-
skip_on_ci()
301291

302292
bad_eps <- c(
303293
"assignee", # Invalid field: assignee_years.num_patents. assignee_years is not a nested field
@@ -320,7 +310,6 @@ test_that("we can't explicitly request assignee_ or inventor_years.num_patents",
320310

321311
test_that("uspcs aren't right", {
322312
skip_on_cran()
323-
skip_on_ci()
324313

325314
# PVS-1615
326315

@@ -341,7 +330,6 @@ test_that("uspcs aren't right", {
341330

342331
test_that("endpoints are still broken", {
343332
skip_on_cran()
344-
skip_on_ci()
345333
# this will fail when the api is fixed
346334

347335
broken_endpoints <- c(

tests/testthat/test-cast-pv-data.R

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
test_that("cast_pv_data casts patent fields as expected", {
22
skip_on_cran()
3-
skip_on_ci()
43

54
pv_out <- search_pv(
65
query = '{"patent_id":"5116621"}', fields = get_fields("patent")
@@ -25,7 +24,6 @@ test_that("cast_pv_data casts patent fields as expected", {
2524

2625
test_that("cast_pv_data casts assignee fields as expected", {
2726
skip_on_cran()
28-
skip_on_ci()
2927

3028
# ** Invalid field: assignee_years.num_patents. assignee_years is not a nested field
3129
pv_out <- search_pv(
@@ -59,7 +57,6 @@ test_that("cast_pv_data casts assignee fields as expected", {
5957

6058
test_that("we can cast a bool", {
6159
skip_on_cran()
62-
skip_on_ci()
6360

6461
# TODO(any): remove when the API returns this as a boolean
6562
fields <- c("rule_47_flag")

tests/testthat/test-check-query.R

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
test_that("errors are thrown on invalid queries", {
33
skip_on_cran()
4-
skip_on_ci()
54

65
expect_error(
76
search_pv(qry_funs$eq("shoe_size" = 11.5)),
@@ -67,7 +66,6 @@ test_that("errors are thrown on invalid queries", {
6766

6867
test_that("a valid nested field can be queried", {
6968
skip_on_cran()
70-
skip_on_ci()
7169

7270
results <- search_pv(qry_funs$eq("application.rule_47_flag" = FALSE))
7371

@@ -76,7 +74,6 @@ test_that("a valid nested field can be queried", {
7674

7775
test_that("the _eq message is thrown when appropriate", {
7876
skip_on_cran()
79-
skip_on_ci()
8077

8178
expect_message(
8279
search_pv(list(patent_date = "2007-03-06")),
@@ -86,7 +83,6 @@ test_that("the _eq message is thrown when appropriate", {
8683

8784
test_that("a query with an and operator returns results", {
8885
skip_on_cran()
89-
skip_on_ci()
9086

9187
patents_query <-
9288
with_qfuns(

tests/testthat/test-get-fields.R

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
test_that("get_fields works as expected", {
22
skip_on_cran()
3-
skip_on_ci()
43

54
expect_error(
65
get_fields("bogus endpoint"),
@@ -24,7 +23,6 @@ test_that("get_fields works as expected", {
2423

2524
test_that("the endpoints are stable", {
2625
skip_on_cran()
27-
skip_on_ci()
2826

2927
# quick check of the endpoints - useful after an api update. We run fieldsdf.R
3028
# and do a build. This test would fail if an endpoint was added, moved or deleted

tests/testthat/test-print.R

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
test_that("We can print the returns from all endpoints ", {
22
skip_on_cran()
3-
skip_on_ci()
43

54
eps <- get_endpoints()
65
bad_eps <- c("cpc_subclass", "uspc_subclass", "uspc_mainclass", "wipo")
@@ -21,7 +20,6 @@ test_that("We can print the returns from all endpoints ", {
2120

2221
test_that("we can print a query, its request, and unnested data", {
2322
skip_on_cran()
24-
skip_on_ci()
2523

2624
x <- "patent"
2725
q <- qry_funs$eq(patent_id = "11530080")

tests/testthat/test-query-dsl.R

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
test_that("between works as expected", {
22
skip_on_cran()
3-
skip_on_ci()
43

54
query <- qry_funs$in_range(patent_date = c("1976-01-06", "1976-01-13"))
65

@@ -11,7 +10,6 @@ test_that("between works as expected", {
1110

1211
test_that("with_qfuns() works as advertised", {
1312
skip_on_cran() # wouldn't necessarily have to skip!
14-
skip_on_ci() # wouldn't necessarily have to skip!
1513

1614
a <- with_qfuns(
1715
and(
@@ -30,7 +28,6 @@ test_that("with_qfuns() works as advertised", {
3028

3129
test_that("argument check works on in_range", {
3230
skip_on_cran() # wouldn't necessarily have to skip!
33-
skip_on_ci() # wouldn't necessarily have to skip!
3431

3532
expect_error(
3633
qq <- qry_funs$in_range("patent_id", c("10000000", "10000002")),

tests/testthat/test-search-pv.R

-17
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ endpoints <- get_endpoints()
77

88
test_that("API returns expected df names for all endpoints", {
99
skip_on_cran()
10-
skip_on_ci()
1110

1211
broken_endpoints <- c(
1312
"cpc_subclass",
@@ -37,7 +36,6 @@ test_that("API returns expected df names for all endpoints", {
3736

3837
test_that("DSL-based query returns expected results", {
3938
skip_on_cran()
40-
skip_on_ci()
4139

4240
query <- with_qfuns(
4341
and(
@@ -54,7 +52,6 @@ test_that("DSL-based query returns expected results", {
5452

5553
test_that("You can download up to 9,000+ records", {
5654
skip_on_cran()
57-
skip_on_ci()
5855

5956
# Should return 9,000+ rows
6057
query <- with_qfuns(
@@ -69,7 +66,6 @@ test_that("You can download up to 9,000+ records", {
6966

7067
test_that("search_pv can pull all fields for all endpoints", {
7168
skip_on_cran()
72-
skip_on_ci()
7369

7470
troubled_endpoints <- c(
7571
"cpc_subclass", "location",
@@ -91,7 +87,6 @@ test_that("search_pv can pull all fields for all endpoints", {
9187

9288
test_that("Sort option works as expected", {
9389
skip_on_cran()
94-
skip_on_ci()
9590

9691
out <- search_pv(
9792
qry_funs$neq(assignee_id = ""),
@@ -106,7 +101,6 @@ test_that("Sort option works as expected", {
106101

107102
test_that("search_pv properly URL encodes queries", {
108103
skip_on_cran()
109-
skip_on_ci()
110104

111105
# Covers https://github.com/ropensci/patentsview/issues/24
112106
# need to use the assignee endpoint now
@@ -135,7 +129,6 @@ test_that("search_pv properly URL encodes queries", {
135129

136130
test_that("We won't expose the user's patentsview API key to random websites", {
137131
skip_on_cran()
138-
skip_on_ci()
139132

140133
# We will try to call the api that tells us who is currently in space
141134
in_space_now_url <- "http://api.open-notify.org/astros.json"
@@ -145,7 +138,6 @@ test_that("We won't expose the user's patentsview API key to random websites", {
145138

146139
test_that("We can call all the legitimate HATEOAS endpoints", {
147140
skip_on_cran()
148-
skip_on_ci()
149141

150142
single_item_queries <- c(
151143
"cpc_subclass/A01B/",
@@ -215,7 +207,6 @@ test_that("We can call all the legitimate HATEOAS endpoints", {
215207

216208
test_that("posts and gets return the same data", {
217209
skip_on_cran()
218-
skip_on_ci()
219210

220211
bad_eps <- c(
221212
"cpc_subclass"
@@ -256,7 +247,6 @@ test_that("posts and gets return the same data", {
256247

257248
test_that("nested shorthand produces the same results as fully qualified ones", {
258249
skip_on_cran()
259-
skip_on_ci()
260250

261251
# the API now allows a shorthand in the fields/f: parameter
262252
# just the group name will retrieve all that group's attributes
@@ -274,7 +264,6 @@ test_that("nested shorthand produces the same results as fully qualified ones",
274264

275265
test_that("the 'after' parameter works properly", {
276266
skip_on_cran()
277-
skip_on_ci()
278267

279268
sort <- c("patent_id" = "asc")
280269
big_query <- qry_funs$eq(patent_date = "2000-01-04") # 3003 total_hits
@@ -311,7 +300,6 @@ test_that("the 'after' parameter works properly", {
311300

312301
test_that("the documentation and Swagger UI URLs work properly", {
313302
skip_on_cran()
314-
skip_on_ci()
315303

316304
documentation_url <-
317305
'https://search.patentsview.org/api/v1/patent/?q={"_text_any":{"patent_title":"COBOL cotton gin"}}&s=[{"patent_id": "asc" }]&o={"size":50}&f=["inventors.inventor_name_last","patent_id","patent_date","patent_title"]'
@@ -328,7 +316,6 @@ test_that("the documentation and Swagger UI URLs work properly", {
328316

329317
test_that("an error occurs if all_pages is TRUE and there aren't any results", {
330318
skip_on_cran()
331-
skip_on_ci()
332319

333320
too_early <- qry_funs$lt(patent_date = "1976-01-01")
334321

@@ -345,7 +332,6 @@ test_that("an error occurs if all_pages is TRUE and there aren't any results", {
345332

346333
test_that("we can retrieve all_pages = TRUE without specifiying fields", {
347334
skip_on_cran()
348-
skip_on_ci()
349335

350336
query <- qry_funs$eq(patent_date = "1976-01-06")
351337
sort <- c("patent_type" = "asc", "patent_id" = "asc")
@@ -362,7 +348,6 @@ test_that("we can retrieve all_pages = TRUE without specifiying fields", {
362348
# the two responses match, then we've correctly handled throttling errors.
363349
test_that("Throttled requests are automatically retried", {
364350
skip_on_cran()
365-
skip_on_ci()
366351

367352
res <- search_pv('{"_gte":{"patent_date":"2007-01-04"}}', size = 50)
368353
patent_ids <- res$data$patents$patent_id
@@ -436,7 +421,6 @@ test_that("Throttled requests are automatically retried", {
436421

437422
test_that("we can sort on an unrequested field across page boundaries", {
438423
skip_on_cran()
439-
skip_on_ci()
440424

441425
# total_hits = 5,352
442426
query <- qry_funs$in_range(patent_date = c("1976-01-01", "1976-01-31"))
@@ -467,7 +451,6 @@ test_that("we can sort on an unrequested field across page boundaries", {
467451

468452
test_that("sort works across page boundaries", {
469453
skip_on_cran()
470-
skip_on_ci()
471454

472455
sort <- c("patent_type" = "desc", "patent_id" = "desc")
473456
results <- search_pv(

tests/testthat/test-unnest-pv-data.R

-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ eps <- get_endpoints()
22

33
test_that("we can unnest all entities", {
44
skip_on_cran()
5-
skip_on_ci()
65

76
# TODO(any): add back fields = get_fields(x)
87
# API throws 500s if some nested fields are included
@@ -49,7 +48,6 @@ test_that("we can unnest all entities", {
4948

5049
test_that("endpoint's pks match their entity's pks", {
5150
skip_on_cran()
52-
skip_on_ci()
5351

5452
# the overloaded_entities endpoints return the same entity, rel_app_texts,
5553
# so we can't determine the endpoint from the entity like we can

tests/testthat/test-utils.R

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
test_that("we can cast the endpoints that return the same entity", {
22
skip_on_cran()
3-
skip_on_ci()
43

54
endpoints <- c("patent/rel_app_text", "publication/rel_app_text")
65

tests/testthat/test-validate-args.R

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
test_that("validate_args throws errors for all bad args", {
66
skip_on_cran()
7-
skip_on_ci()
87

98
# requesting the old plural endpoint should now throw an error
109
expect_error(
@@ -66,7 +65,6 @@ test_that("validate_args throws errors for all bad args", {
6665

6766
test_that("group names can be requested as fields via new API shorthand", {
6867
skip_on_cran()
69-
skip_on_ci()
7068

7169
endpoint <- "patent"
7270
shorthand <- get_fields("patent", groups=c("application"))

0 commit comments

Comments
 (0)