Skip to content

Releases: r-dbi/DBItest

DBItest 1.8.2

10 Dec 02:15
Compare
Choose a tag to compare

Chore

  • More explicit message on constructive errors.

  • Bump DBI dependency.

Documentation

  • Set BS version explicitly for now (@maelle, #370).

  • Add package to \link{} targets.

Testing

  • Adapt tests to updates of the constructive package.

DBItest 1.8.1

02 Apr 01:38
Compare
Choose a tag to compare

Features

  • Allow multiple warnings in disconnect tests (#363).

  • Fix specification for Arrow tests (#357).

  • Show DBItest function in backtrace (#349, #354).

  • Specify value argument for dbCreateTable() and dbCreateTableArrow() (#345).

  • Enable two tests for dbGetQueryArrow() (#342).

  • Relax dbListObjects() spec (#339, #341).

Chore

  • Avoid dplyr (#364).

  • Remove .dots argument to test_select_with_null() (#362).

  • Prefer map() over lapply() (#361) and map_*() over vapply() (#356).

  • Bump DBI dependency to fix tests (#359).

  • Document sources for autogenerated files (#353), add comments to generated code (#358).

  • Make test names unique, with a numeric suffix (#355).

  • Align with RSQLite (#351).

  • Replace unconditional skip with versioned skip (#347).

  • Consistent use of skip_if_not_dbitest() (#346).

Continuous integration

  • Modernize backends checks.

Documentation

  • Use dbitemplate (@maelle, #360).

  • Mention dbBindArrow() in documentation (#350).

  • Minor specification fixes (#344).

DBItest 1.8.0

23 Dec 01:38
Compare
Choose a tag to compare

Bug fixes

  • Fix create_roundtrip_keywords and create_roundtrip_quotes tests (#283).

Features

  • Relax specification of dbUnquoteIdentifier(), character vectors are now allowed too.

  • Specify dbFetchChunk() (#331), dbFetchArrowChunk() (#301) and dbBindArrow() (#328).

  • Inline all tests for dbBind() (#326).

  • Require support for dbFetch(n = NA) (#296, #316).

  • New allow_na_rows_affected tweak to support NA values returned from dbGetRowsAffected() (#297, #312).

  • Switch to nanoarrow (#291).

  • Basic tests for the new db*Arrow() interface (#287).

  • New skip_if_not_dbitest() (#289).

  • reexport test uses interface for dev DBI if the backend is compatible with DBItest > 1.7.3.

  • Slightly better code generated for tweaks() (#313).

  • Remove interface to dblog in the CRAN version.

CI/CD

  • Add adbi to check matrix (#314).

  • Reenable ODBC MySQL tests (#288).

  • Tweak read_table_missing test (#285).

Chore

  • Remove rlang qualification (#332).

  • No longer need as.data.frame() twice for Arrow (#302, #330).

  • Consistent use of skip_if_not_dbitest() (#317).

  • Disable Arrow skips (#303).

  • Modernize sql_union() (#304).

  • Make better use of trivial_df() (#284).

Documentation

  • Avoid error if RSQLite is not installed.

Testing

  • Run DBItest for SQLite as part of the checks here (#318).

  • Enable remaining Arrow tests (#307).

  • Fix checks without suggested packages (#300).

DBItest 1.7.3

19 Oct 01:04
Compare
Choose a tag to compare

Features

  • Use and enable compatibility with testthat edition 3 (#263, #268). Complete removal of expect_is() (@MichaelChirico, #257).

  • Adapt to new Arrow DBI generics (#265).

  • Better stack traces for visibility tests.

  • dbQuoteIdentifier() roundtrip is tested for tables only (@dpprdan, #256).

  • test_some() also tests a test if it would normally be skipped.

Chores

  • Bump minimum DBI version to 1.1.3.

  • Refactor DBI tests in preparation for inlining them.

Bug fixes

  • Correct cleanup even if dbIsValid() is not implemented.

DBItest 1.7.2

17 Dec 13:49
Compare
Choose a tag to compare

Features

  • tweaks() gains dbitest_version argument to support targeting a specific version of the DBItest package. The default is 1.7.1 (#236).
  • Reuse database connection for most tests (#245).
  • New roundtrip_date_extended, roundtrip_timestamp_extended, append_roundtrip_date_extended and append_roundtrip_timestamp_extended test dates between 1800 and 2999 (#148, #249).
  • New quote_literal_empty test (#248).
  • New bind_character_escape test for binding special characters (#242).
  • New bind_time_minutes_integer test for integer durations.

Bug fixes

  • All column names are specified using lowercase on input, for compatibility with Redshift (#234).
  • column_info_consistent no longer tests mangling of column names (#181).
  • spec_sql_append_table test: Remove bad argument.

Documentation

  • Improve documentation: list spec_ objects in pkgdown help index, add cross references (#128).
  • Add specification for value argument to DBI::dbWriteTable() (#235).

Internal

  • Replace internal with_result(), with_remove_test_tables() and with_rollback_on_error() for better error traces (#184, #250, #251, #253).
  • Use palmerpenguins::penguins instead of iris (#241).
  • Fix MySQL ODBC test on GitHub Actions (#237).
  • Improve testthat 3e compatibility: remove testthat::expect_is() and testthat::expect_that() from tests (#231, @michaelquinn32).
  • Decompose query used for testing dbBind().

DBItest 1.7.1

01 Aug 16:53
Compare
Choose a tag to compare

Features

  • Many tests now emit simpler stack traces, because the connection is opened by the test driver and not by the test itself (#187). Reduce usage of with_remove_test_table() for better stack traces on error (#196). Remove with_*connection() (#193).
  • test_some() shows DBI code via dblog (#217) if dblog = TRUE (#226).
  • New "bind_date_integer", "bind_time_seconds" and "bind_time_hours" tests (#218).
  • New create_table_as tweak (#131).
  • "roundtrip_time" and "append_roundtrip_time" tests now also test values of class "difftime" with units other than "secs" (#199).
  • All tables created by the tests have the "dbit" prefix. Almost all tests now use random table names to avoid collisions and unrelated test failures (#197).
  • "roundtrip_timestamp" tests now accept a time zone set by the database backend (#178, #198).
  • Support more than one class of each type in DBI backend packages.

Bug fixes

  • Fix input dataset in "overwrite_table_missing" test (#210, @martinstuder).
  • Use original test name to decide if a test is skipped (#225).
  • Fix reexport test: skip if package is not installed, remove checks for deprecated functions and functions not reexported (#203).

Internal

  • Requires DBI 1.1.1.
  • Test odbc as part of the backend tests (#228).
  • Dynamic build matrix for backends (#221).
  • Compatibility with testthat 3.0.0 (#207).
  • Switch to GitHub Actions (#201).

DBItest 1.7.0

17 Dec 09:06
Compare
Choose a tag to compare

Specifications

  • Specify tests for dbGetInfo().
  • Specify immediate argument (r-dbi/DBI#268).
  • Specify dbCreateTable() and dbAppendTable() (#169).
  • New unquote_identifier_table_schema test: Identifiers of the form table.schema can be processed with dbUnquoteIdentifier().
  • Fix has_completed_statement test (#176).

Testing infrastructure

  • Document how to run tests externally and how to debug tests (#165).
  • test_*() gain new run_only = NULL argument that allow restricting the tests to be run with a positive match. test_some() uses run_only instead of constructing a regular expression with negative lookahead. This helps troubleshooting a single test with testthat::set_reporter(DebugReporter$new()) .
  • make_context() gains default_skip argument and uses the DBIConnector class.
  • Support NULL default value in driver constructor (#171).

Internal

  • Fulfill CII badge requirements (#179, @TSchiefer).
  • Use debugme.
  • Require R 3.2.
  • Avoid subsetting vectors out of bounds, for consistency with vctrs.

DBItest 1.5-1

18 Dec 10:06
Compare
Choose a tag to compare
  • Remove "cannot_forget_disconnect" test that fails on R-devel (#150).

v1.5

19 Jun 11:35
Compare
Choose a tag to compare

Finalize specification. Most tests now come with a corresponding prose,
only those where the behavior is not finally decided don't have a prose
version yet (#88).

New tests

  • Test behavior of methods in presence of placeholders (#120).
  • Test column name mismatch behavior for appending tables (#93).
  • Test that dbBind() against factor works but raises a warning (#91).
  • Test roundtrip of alternating empty and non-empty strings (#42).
  • Test multiple columns of different types in one statement or table
    (#35).
  • Test field.types argument to dbWriteTable() (#12).
  • Added tests for invalid or closed connection argument to all methods
    that expect a connection as first argument (#117).
  • Enabled test that tests a missing dbDisconnect().
  • Add test for unambiguous escaping of identifiers
    (r-dbi/RSQLite#123).
  • Reenable tests for visibility (#89).
  • Fix and specify 64-bit roundtrip test.
  • 64-bit integers only need to be coercible to numeric and character
    (#74).
  • Added roundtrip test for time values (#14).
  • Added tweaks for handling date, time, timestamp, ... (#53, #76).
  • Test that dbFetch() on update-only query returns warning (#66).

Adapted tests

  • NULL is a valid value for the row.names argument, same as FALSE.
  • A column named row_names receives no special handling (#54).
  • A warning (not an error anymore) is expected when calling
    dbDisconnect() on a closed or invalid connection.
  • row.names = FALSE is now the default for methods that read or write
    tables.
  • Add NA to beginning and end of columns in table roundtrip tests
    (#24).
  • Stricter tests for confusion of named and unnamed SQL parameters and
    placeholders (#107).
  • Also check names of all returned data frames.
  • The return value for all calls to dbGetQuery(), dbFetch(), and
    dbReadTable() is now checked for consistency (all columns have the
    same length, length matches number of rows) (#126).
  • Removed stress tests that start a new session.
  • Allow hms (or other subclasses of difftime) to be returned as time
    class (#135, @jimhester).
  • Test that dates are of type numeric (#99, @jimhester).
  • Replace POSIXlt by POSIXct (#100, @jimhester).
  • Use "PST8PDT" instead of "PST" as time zone (#110, @thrasibule).
  • Added tests for support of blob objects (input and output), but
    backends are not required to return blob objects (#98).
  • The logical_return, date_typed and timestamp_typed tweaks are
    respected by the bind tests.
  • Fixed tests involving time comparison; now uses UTC timezone and
    compares against a difftime.
  • Tests for roundtrip of character values now includes tabs, in addition
    to many other special characters (#85).
  • Make sure at least one table exists in the dbListTables() test.
  • Fix roundtrip tests for raw columns: now expecting NULL and not NA
    entries for SQL NULL values.
  • Fix expect_equal_df() for list columns.
  • Testing that a warning is given if the user forgets to call
    dbDisconnect() or dbClearResult() (#103).
  • Numeric roundtrip accepts conversion of NaN to NA (#79).

Internal

  • Fix R CMD check errors.
  • Internal consistency checks (#114).
  • Skip patterns that don't match any of the tests now raise a warning
    (#84).
  • New test_some() to test individual tests (#136).
  • Use desc instead of devtools (#40).
  • All unexpected warnings are now reported as test failures (#113).
  • DBItest_tweaks class gains a $ method, accessing an undefined
    tweak now raises an error.
  • The arguments of the tweaks() function now have default values that
    further describe their intended usage.
  • New with_closed_connection(), with_invalid_connection(),
    with_result() and with_remove_test_table() helpers, and
    expect_visible(), expect_inbisible_true(), and expect_equal_df()
    expectations for more concise tests.

v1.4

04 Dec 21:11
Compare
Choose a tag to compare

DBI specification

  • Use markdown in documentation.
  • Description of parametrized queries and statements (#88).
  • New hidden DBIspec-wip page for work-in-progress documentation.
  • Get rid of "Format" and "Usage" sections, and aliases, in the specs.

Tests

  • Not testing for presence of max.connections element in dbGetInfo(Driver) (r-dbi/DBI#56).
  • Test multi-row binding for queries and statements (#96).
  • New ellipsis check that verifies that all implemented DBI methods contain ... in their formals. This excludes show() and all methods defined in this or other packages.
  • Refactored bind_ tests to use the new parameter_pattern tweak (#95).
  • Rough draft of transaction tests (#36).
  • New fetch_zero_rows test, split from fetch_premature_close.
  • The "compliance" test tests that the backend package exports exactly one subclass of each DBI virtual class.
  • Document and enhance test for dbDataType("DBIDriver", "ANY") (#88).
  • Minor corrections for "bind" tests.

Internal

  • Isolate stress tests from main test suite (#92).
  • Refactor test specification in smaller modules, isolated from actual test execution (#81). This breaks the documentation of the tests, which will be substituted by a DBI specification in prose.
  • Align description of binding with code.
  • Refactor tests for dbBind(), test is run by BindTester class, and behavior is specified by members and by instances of the new BindTesterExtra class.
  • The skip argument to the test_() functions is again evaluated with perl = TRUE to support negative lookaheads (#33).
  • Use dbSendStatement() and dbExecute() where appropriate.
  • Avoid empty subsections in Rd documentation to satisfy R CMD check (#81).