MyGit

r-dbi/DBItest

Fork: 18 Star: 24 (更新于 2024-12-18 04:59:18)

license: LGPL-2.1

Language: R .

Testing DBI drivers

官方网址 GitHub网址

DBItest

rcc Codecov test coverage CRAN_Status_Badge CII Best Practices

This package is primarily useful for developers of DBI backends. It provides a considerable set of test cases for DBI backends. These test cases correspond to the DBI specification. Please follow the steps below to add these test cases to your DBI backend.

Installation

Install from CRAN via

install.packages("DBItest")

or the development version using

devtools::install_github("r-dbi/DBItest")

Usage

In your driver package, add DBItest to the Suggests: and enable the tests. Run the following code in you package's directory:

# install.packages("usethis")
usethis::use_package("DBItest", "suggests")
usethis::use_test("DBItest")

This enables testing using testthat (if necessary) and creates, among others, a file test-DBItest.R in the tests/testthat directory. Replace its entire contents by the following:

DBItest::make_context(Kazam(), NULL)
DBItest::test_all()

This assumes that Kazam() returns an instance of your DBIDriver class. Additional arguments to dbConnect() are specified as named list instead of the NULL argument to make_context(). The default_skip argument to make_context() allows skipping tests that are not (yet) satisfied by your backend.

Further reading:

  • Detailed instructions in vignette("DBItest")

  • The feature list in the original proposal.


Please note that the 'DBItest' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

最近版本更新:(数据更新于 1970-01-01 00:00:00)

主题(topics):

database, r, testing

r-dbi/DBItest同语言 R最近更新仓库

2024-09-16 18:09:18 thomasp85/patchwork

2024-03-10 23:55:19 cxli233/FriendsDontLetFriends

2024-01-23 09:29:59 wilkelab/cowplot

2022-10-25 19:45:23 Dralliag/opera

2021-11-02 22:21:46 biobakery/Maaslin2

2020-06-03 15:47:30 roblanf/minion_qc