Skip to content

Commit f769d0b

Browse files
committed
Many more skips
1 parent f159b42 commit f769d0b

13 files changed

+183
-0
lines changed

Diff for: tests/testthat/test-DBItest.R

+131
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,137 @@ skip_on_cran()
22

33
if (rlang::is_installed("DBItest")) DBItest::test_all(c(
44
if (!TEST_RE2) c(
5+
"send_query_immediate",
6+
"clear_result_return_query_arrow",
7+
"cannot_clear_result_twice_query_arrow",
8+
"get_query_immediate",
9+
"send_statement_params",
10+
"execute_params",
11+
"read_table_missing",
12+
"read_table_row_names_false",
13+
"read_table_row_names_true_exists",
14+
"read_table_row_names_true_missing",
15+
"read_table_row_names_na_exists",
16+
"read_table_row_names_string_exists",
17+
"read_table_row_names_string_missing",
18+
"read_table_row_names_default",
19+
"read_table_check_names",
20+
"read_table_check_names_false",
21+
"read_table_closed_connection",
22+
"read_table_invalid_connection",
23+
"read_table_error",
24+
"read_table_name",
25+
"create_table_error",
26+
"create_table_temporary",
27+
"create_table_row_names_non_null",
28+
"append_table_missing",
29+
"append_table_error",
30+
"append_roundtrip_quotes",
31+
"append_roundtrip_time",
32+
"append_roundtrip_mixed",
33+
"write_table_return",
34+
"write_table_overwrite",
35+
"write_table_append_incompatible",
36+
"roundtrip_.*",
37+
"write_table_name",
38+
"write_table_value_df",
39+
"temporary_table",
40+
"roundtrip_keywords",
41+
"roundtrip_quotes",
42+
"roundtrip_quotes_table_names",
43+
"roundtrip_integer",
44+
"roundtrip_numeric",
45+
"roundtrip_logical",
46+
"roundtrip_null",
47+
"roundtrip_64_bit_numeric",
48+
"roundtrip_64_bit_roundtrip",
49+
"write_table_row_names_false",
50+
"write_table_row_names_true_exists",
51+
"write_table_row_names_na_exists",
52+
"write_table_row_names_string_exists",
53+
"write_table_row_names_default",
54+
"list_tables_temporary",
55+
"exists_table",
56+
"exists_table_temporary",
57+
"exists_table_error",
58+
"exists_table_name",
59+
"remove_table_return",
60+
"remove_table_missing",
61+
"remove_table_closed_connection",
62+
"remove_table_invalid_connection",
63+
"remove_table_error",
64+
"remove_table_temporary_arg",
65+
"remove_table_missing_succeed",
66+
"remove_table_temporary",
67+
"remove_table_name",
68+
"list_objects_temporary",
69+
"list_fields",
70+
"list_fields_temporary",
71+
"list_fields_wrong_table",
72+
"list_fields_quoted",
73+
"list_fields_row_names",
74+
"bind_return_value_statement",
75+
"bind_multi_row_unequal_length",
76+
"bind_multi_row_statement",
77+
"bind_repeated_statement",
78+
"bind_repeated_untouched_statement",
79+
"arrow_bind_multi_row_unequal_length",
80+
"stream_bind_return_value_statement",
81+
"stream_bind_multi_row_statement",
82+
"stream_bind_repeated_statement",
83+
"stream_bind_repeated_untouched_statement",
84+
"column_info",
85+
"column_info_row_names",
86+
"rows_affected_statement",
87+
"begin_write_commit",
88+
"begin_write_rollback",
89+
"begin_write_disconnect",
90+
"with_transaction_success",
91+
"with_transaction_failure",
92+
"with_transaction_break",
93+
"arrow_send_query_immediate",
94+
"arrow_get_query_arrow_immediate",
95+
"arrow_read_table_arrow",
96+
"arrow_read_table_arrow_missing",
97+
"arrow_read_table_arrow_empty",
98+
"arrow_read_table_arrow_closed_connection",
99+
"arrow_read_table_arrow_invalid_connection",
100+
"arrow_read_table_arrow_error",
101+
"arrow_read_table_arrow_name",
102+
"arrow_write_table_arrow_return",
103+
"arrow_write_table_arrow_error_overwrite",
104+
"arrow_write_table_arrow_append_incompatible",
105+
"arrow_write_table_arrow_error",
106+
"arrow_write_table_arrow_name",
107+
"arrow_write_table_arrow_value_df",
108+
"arrow_write_table_arrow_overwrite",
109+
"arrow_write_table_arrow_overwrite_missing",
110+
"arrow_write_table_arrow_append",
111+
"arrow_write_table_arrow_append_new",
112+
"arrow_write_table_arrow_temporary",
113+
"arrow_write_table_arrow_visible_in_other_connection",
114+
"arrow_write_table_arrow_roundtrip_quotes",
115+
"arrow_write_table_arrow_roundtrip_quotes_table_names",
116+
"arrow_write_table_arrow_roundtrip_integer",
117+
"arrow_write_table_arrow_roundtrip_numeric",
118+
"arrow_write_table_arrow_roundtrip_null",
119+
"arrow_write_table_arrow_roundtrip_64_bit_roundtrip",
120+
"arrow_write_table_arrow_roundtrip_character_empty",
121+
"arrow_write_table_arrow_roundtrip_character_empty_after",
122+
"arrow_write_table_arrow_roundtrip_date",
123+
"arrow_write_table_arrow_roundtrip_date_extended",
124+
"arrow_write_table_arrow_roundtrip_time",
125+
"arrow_write_table_arrow_roundtrip_mixed",
126+
"arrow_create_table_arrow_error",
127+
"arrow_create_table_arrow_temporary",
128+
"arrow_create_table_arrow_visible_in_other_connection",
129+
"arrow_append_table_arrow_return",
130+
"arrow_append_table_arrow_missing",
131+
"arrow_append_table_arrow_error",
132+
"arrow_append_table_arrow_roundtrip_quotes",
133+
"arrow_append_table_arrow_roundtrip_64_bit_roundtrip",
134+
"arrow_append_table_arrow_roundtrip_time",
135+
"arrow_append_table_arrow_roundtrip_mixed",
5136
"list_tables",
6137
"list_tables_quote",
7138
"list_fields_object",

Diff for: tests/testthat/test-arrow.R

+2
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ test_that("to_duckdb with a table", {
262262
})
263263

264264
test_that("to_duckdb passing a connection", {
265+
skip_if_not(TEST_RE2)
266+
265267
ds <- InMemoryDataset$create(example_data)
266268

267269
con_separate <- dbConnect(duckdb())

Diff for: tests/testthat/test-connect.R

+12
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ test_that("no warning on dbConnect() with other dbdir", {
5656
})
5757

5858
test_that("can connect to the same in-memory database via the same driver object", {
59+
skip_if_not(TEST_RE2)
60+
5961
drv <- duckdb()
6062

6163
con1 <- dbConnect(drv)
@@ -74,6 +76,8 @@ test_that("can connect to the same in-memory database via the same driver object
7476
})
7577

7678
test_that("will connect to different in-memory databases via different driver objects", {
79+
skip_if_not(TEST_RE2)
80+
7781
drv1 <- duckdb()
7882
con1 <- dbConnect(drv1)
7983
on.exit(dbDisconnect(con1), add = TRUE)
@@ -92,6 +96,8 @@ test_that("will connect to different in-memory databases via different driver ob
9296
})
9397

9498
test_that("can connect to the same database file via the same driver object", {
99+
skip_if_not(TEST_RE2)
100+
95101
drv <- duckdb(tempfile(fileext = ".duckdb"))
96102

97103
con1 <- dbConnect(drv)
@@ -110,6 +116,8 @@ test_that("can connect to the same database file via the same driver object", {
110116
})
111117

112118
test_that("can connect to the same database file via different driver objects", {
119+
skip_if_not(TEST_RE2)
120+
113121
path <- tempfile(fileext = ".duckdb")
114122
writeLines(character(), path)
115123
path <- normalizePath(path)
@@ -133,6 +141,8 @@ test_that("can connect to the same database file via different driver objects",
133141
})
134142

135143
test_that("read_only only applies to the first driver object for a path", {
144+
skip_if_not(TEST_RE2)
145+
136146
path <- tempfile(fileext = ".duckdb")
137147
writeLines(character(), path)
138148
path <- normalizePath(path)
@@ -154,6 +164,8 @@ test_that("read_only only applies to the first driver object for a path", {
154164
})
155165

156166
test_that("config only applies to the first driver object for a path", {
167+
skip_if_not(TEST_RE2)
168+
157169
path <- tempfile(fileext = ".duckdb")
158170
writeLines(character(), path)
159171
path <- normalizePath(path)

Diff for: tests/testthat/test-dbwritetable.R

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
test_that("dbWriteTable can write tables with keyword column names", {
2+
skip_if_not(TEST_RE2)
3+
24
con <- dbConnect(duckdb())
35
on.exit(dbDisconnect(con, shutdown = TRUE))
46

Diff for: tests/testthat/test-factor.R

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
test_that("factors can be round tripped", {
2+
skip_if_not(TEST_RE2)
3+
24
con <- dbConnect(duckdb())
35
on.exit(dbDisconnect(con, shutdown = TRUE))
46

@@ -20,6 +22,8 @@ test_that("factors can be round tripped", {
2022

2123

2224
test_that("iris can be round-tripped", {
25+
skip_if_not(TEST_RE2)
26+
2327
con <- dbConnect(duckdb())
2428
on.exit(dbDisconnect(con, shutdown = TRUE))
2529

@@ -33,6 +37,8 @@ test_that("iris can be round-tripped", {
3337
})
3438

3539
test_that("non-utf things can be read", {
40+
skip_if_not(TEST_RE2)
41+
3642
con <- dbConnect(duckdb())
3743
on.exit(dbDisconnect(con, shutdown = TRUE))
3844

@@ -60,6 +66,8 @@ test_that("non-utf things can be read", {
6066

6167

6268
test_that("single value factors round trip correctly, issue 2627", {
69+
skip_if_not(TEST_RE2)
70+
6371
con <- dbConnect(duckdb())
6472
on.exit(dbDisconnect(con, shutdown = TRUE))
6573

Diff for: tests/testthat/test-readonly.R

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
test_that("read_only flag and shutdown works as expected", {
2+
skip_if_not(TEST_RE2)
3+
24
dbdir <- tempfile()
35

46
# 1st: create a db and write some tables

Diff for: tests/testthat/test-register.R

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ test_that("duckdb_register() works", {
3838

3939

4040
test_that("various error cases for duckdb_register()", {
41+
skip_if_not(TEST_RE2)
42+
4143
con <- dbConnect(duckdb())
4244

4345
duckdb_register(con, "my_df1", iris)

Diff for: tests/testthat/test-register_arrow.R

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ skip_if_not(arrow::arrow_with_parquet(), message = "The installed Arrow is not f
77
library("arrow")
88

99
test_that("duckdb_register_arrow() works", {
10+
skip_if_not(TEST_RE2)
11+
1012
con <- dbConnect(duckdb())
1113
on.exit(dbDisconnect(con, shutdown = TRUE))
1214

@@ -27,6 +29,8 @@ test_that("duckdb_register_arrow() works", {
2729
})
2830

2931
test_that("duckdb_register_arrow() works with record_batch_readers", {
32+
skip_if_not(TEST_RE2)
33+
3034
con <- dbConnect(duckdb())
3135
on.exit(dbDisconnect(con, shutdown = TRUE))
3236

@@ -45,6 +49,8 @@ test_that("duckdb_register_arrow() works with record_batch_readers", {
4549
})
4650

4751
test_that("duckdb_register_arrow() works with scanner", {
52+
skip_if_not(TEST_RE2)
53+
4854
con <- dbConnect(duckdb())
4955
on.exit(dbDisconnect(con, shutdown = TRUE))
5056

Diff for: tests/testthat/test-shutdown.R

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
test_that("disconnect releases database file", {
2+
skip_if_not(TEST_RE2)
3+
24
db_path <- withr::local_tempfile(fileext = ".duckdb")
35

46
session_1 <- callr::r_session$new()

Diff for: tests/testthat/test-struct.R

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ test_that("structs give the same results via Arrow", {
110110
})
111111

112112
test_that("nested lists of atomic values can be written", {
113+
skip_if_not(TEST_RE2)
114+
113115
skip_if_not_installed("vctrs")
114116

115117
con <- dbConnect(duckdb())
@@ -128,6 +130,8 @@ test_that("nested lists of atomic values can be written", {
128130
})
129131

130132
test_that("nested and packed columns work in full", {
133+
skip_if_not(TEST_RE2)
134+
131135
skip_if_not_installed("vctrs")
132136

133137
con <- dbConnect(duckdb())

Diff for: tests/testthat/test-tbl__duckdb_connection.R

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ if (rlang::is_installed("dbplyr")) {
44
}
55

66
test_that("Parquet files can be registered with dplyr::tbl()", {
7+
skip_if_not(TEST_RE2)
8+
79
skip_if_not_installed("dbplyr")
810

911
con <- DBI::dbConnect(duckdb())
@@ -86,6 +88,8 @@ test_that("Object cache can be enabled for parquet files with tbl_file() and tbl
8688

8789

8890
test_that("CSV files can be registered with dplyr::tbl()", {
91+
skip_if_not(TEST_RE2)
92+
8993
skip_if_not_installed("dbplyr")
9094

9195
path <- file.path(tempdir(), "duckdbtest.csv")
@@ -125,6 +129,8 @@ test_that("CSV files can be registered with tbl_file() and tbl_query()", {
125129

126130

127131
test_that("Other replacement scans or functions can be registered with dplyr::tbl()", {
132+
skip_if_not(TEST_RE2)
133+
128134
skip_if_not_installed("dbplyr")
129135

130136
con <- DBI::dbConnect(duckdb())

Diff for: tests/testthat/test-timestamp.R

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
test_that("fractional seconds can be roundtripped", {
2+
skip_if_not(TEST_RE2)
3+
24
con <- dbConnect(duckdb())
35
on.exit(dbDisconnect(con, shutdown = TRUE))
46

Diff for: tests/testthat/test-viewer.R

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ test_that("rs_list_columns", {
5757
})
5858

5959
test_that("rs_viewer", {
60+
skip_if_not(TEST_RE2)
61+
6062
con <- dbConnect(duckdb())
6163
on.exit(dbDisconnect(con, shutdown = TRUE))
6264

@@ -75,6 +77,8 @@ test_that("rs_actions", {
7577
})
7678

7779
test_that("mock observer hooray", {
80+
skip_if_not(TEST_RE2)
81+
7882
called_connection_opened <- FALSE
7983
called_connection_closed <- FALSE
8084
called_connection_updated <- FALSE

0 commit comments

Comments
 (0)