diff options
author | Pekka Ristola | 2024-03-17 14:26:56 +0200 |
---|---|---|
committer | Pekka Ristola | 2024-03-17 14:26:56 +0200 |
commit | 832ad53f3bf29db4f4c1357ec3ae5139695ebc36 (patch) | |
tree | 3ff1b23b0cffe37a94272679df5d5f4387e3bc88 | |
parent | 83a81f14b5dfcbd7a5f1f2725d2da0882c80943b (diff) | |
download | aur-832ad53f3bf29db4f4c1357ec3ae5139695ebc36.tar.gz |
Fix tests
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | fix-tests.patch | 242 |
4 files changed, 263 insertions, 14 deletions
@@ -1,7 +1,7 @@ pkgbase = r-dplyr pkgdesc = A Grammar of Data Manipulation pkgver = 1.1.4 - pkgrel = 1 + pkgrel = 2 url = https://cran.r-project.org/package=dplyr arch = x86_64 license = MIT @@ -43,7 +43,10 @@ pkgbase = r-dplyr optdepends = r-tidyr optdepends = r-withr source = https://cran.r-project.org/src/contrib/dplyr_1.1.4.tar.gz + source = fix-tests.patch md5sums = 29bdf98592722336f0d07484baf2a959 - sha256sums = cf730414d5d4ab387b4e9890a4b1df9d17a3903488e8da8df1cf2e11e44558cb + md5sums = 386fe9fd45e30f6833f4c4f86b86b2ea + b2sums = 3f16d1b818bae28f1cda84244378d9a4a1981cad6ee00ce1f905d5828b8dd4a29d2f4bfe161483300924784c3bdab2cc02a16571042776922dc4bfb845b351da + b2sums = 304013a86b786a05f53a57c124c73af4941c3a91ee9d2ef8facfb4d15d6b864c2b75fc3ace66c532dfdfd6c81fe01bb22bd2e3ecbf65b31c0992cc34ec507647 pkgname = r-dplyr diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 018a3de08144..000000000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!PKGBUILD -!.SRCINFO -!.gitignore @@ -7,11 +7,11 @@ _pkgname=dplyr _pkgver=1.1.4 pkgname=r-${_pkgname,,} pkgver=${_pkgver//-/.} -pkgrel=1 +pkgrel=2 pkgdesc="A Grammar of Data Manipulation" arch=(x86_64) -url="https://cran.r-project.org/package=${_pkgname}" -license=(MIT) +url="https://cran.r-project.org/package=$_pkgname" +license=('MIT') depends=( r-cli r-generics @@ -55,13 +55,21 @@ optdepends=( r-tidyr r-withr ) -source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") -md5sums=('29bdf98592722336f0d07484baf2a959') -sha256sums=('cf730414d5d4ab387b4e9890a4b1df9d17a3903488e8da8df1cf2e11e44558cb') +source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz" + "fix-tests.patch") +md5sums=('29bdf98592722336f0d07484baf2a959' + '386fe9fd45e30f6833f4c4f86b86b2ea') +b2sums=('3f16d1b818bae28f1cda84244378d9a4a1981cad6ee00ce1f905d5828b8dd4a29d2f4bfe161483300924784c3bdab2cc02a16571042776922dc4bfb845b351da' + '304013a86b786a05f53a57c124c73af4941c3a91ee9d2ef8facfb4d15d6b864c2b75fc3ace66c532dfdfd6c81fe01bb22bd2e3ecbf65b31c0992cc34ec507647') + +prepare() { + # fix test snapshots + patch -Np1 -i fix-tests.patch +} build() { - mkdir -p build - R CMD INSTALL "$_pkgname" -l build + mkdir build + R CMD INSTALL -l build "$_pkgname" } check() { diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 000000000000..0f7a064461e8 --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,242 @@ +diff --git a/dplyr/tests/testthat/_snaps/across.md b/dplyr/tests/testthat/_snaps/across.md +index 28b90a7..ae9b082 100644 +--- a/dplyr/tests/testthat/_snaps/across.md ++++ b/dplyr/tests/testthat/_snaps/across.md +@@ -88,7 +88,7 @@ + Error in `summarise()`: + i In argument: `across(y, mean)`. + Caused by error in `across()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `y` doesn't exist. + Code + (expect_error(tibble(x = 1) %>% summarise(res = across(where(is.numeric), 42)))) +@@ -105,7 +105,7 @@ + Error in `summarise()`: + i In argument: `z = across(y, mean)`. + Caused by error in `across()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `y` doesn't exist. + Code + (expect_error(tibble(x = 1) %>% summarise(res = sum(if_any(where(is.numeric), +@@ -314,7 +314,7 @@ + i In argument: `y = c_across(g)`. + i In group 1: `g = 1`. + Caused by error in `c_across()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `g` doesn't exist. + + # across() applies old `.cols = everything()` default with a warning +diff --git a/dplyr/tests/testthat/_snaps/by.md b/dplyr/tests/testthat/_snaps/by.md +index 343d990..0147b13 100644 +--- a/dplyr/tests/testthat/_snaps/by.md ++++ b/dplyr/tests/testthat/_snaps/by.md +@@ -4,7 +4,7 @@ + compute_by(by = y, data = df) + Condition + Error: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `y` doesn't exist. + + # can't set `.by` with a grouped-df +diff --git a/dplyr/tests/testthat/_snaps/colwise-mutate.md b/dplyr/tests/testthat/_snaps/colwise-mutate.md +index 3e512b8..98d7093 100644 +--- a/dplyr/tests/testthat/_snaps/colwise-mutate.md ++++ b/dplyr/tests/testthat/_snaps/colwise-mutate.md +@@ -30,7 +30,7 @@ + Output + <error/vctrs_error_subscript_oob> + Error in `tbl_at_vars()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `test` doesn't exist. + Code + tbl <- tibble(gr1 = rep(1:2, 4), gr2 = rep(1:2, each = 4), x = 1:8) +@@ -39,7 +39,7 @@ + Output + <error/vctrs_error_subscript_oob> + Error in `tbl_at_vars()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `gr1` doesn't exist. + Code + (expect_error(mutate_all(mtcars, length, 0, 0))) +diff --git a/dplyr/tests/testthat/_snaps/conditions.md b/dplyr/tests/testthat/_snaps/conditions.md +index 4f2446c..0012697 100644 +--- a/dplyr/tests/testthat/_snaps/conditions.md ++++ b/dplyr/tests/testthat/_snaps/conditions.md +@@ -47,7 +47,7 @@ + select(mtcars, 1 + "") + Condition + Error in `foo()`: +- ! Problem while evaluating `1 + ""`. ++ i In argument: `1 + ""`. + Caused by error in `1 + ""`: + ! non-numeric argument to binary operator + Code +diff --git a/dplyr/tests/testthat/_snaps/context.md b/dplyr/tests/testthat/_snaps/context.md +index a0b60d1..08b03fb 100644 +--- a/dplyr/tests/testthat/_snaps/context.md ++++ b/dplyr/tests/testthat/_snaps/context.md +@@ -40,5 +40,5 @@ + Code + group_labels_details(c(a = 1, b = 2)) + Output +- [1] "`a = 1`, `b = 2`" ++ [1] "`a = 1` and `b = 2`" + +diff --git a/dplyr/tests/testthat/_snaps/group-by.md b/dplyr/tests/testthat/_snaps/group-by.md +index 79d540f..0717593 100644 +--- a/dplyr/tests/testthat/_snaps/group-by.md ++++ b/dplyr/tests/testthat/_snaps/group-by.md +@@ -44,7 +44,7 @@ + Output + <error/vctrs_error_subscript_oob> + Error in `ungroup()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `z` doesn't exist. + Code + (expect_error(df %>% group_by(z = a + 1))) +diff --git a/dplyr/tests/testthat/_snaps/pick.md b/dplyr/tests/testthat/_snaps/pick.md +index 9142b2d..b722988 100644 +--- a/dplyr/tests/testthat/_snaps/pick.md ++++ b/dplyr/tests/testthat/_snaps/pick.md +@@ -30,7 +30,7 @@ + Error in `mutate()`: + i In argument: `y = pick(g)`. + Caused by error in `pick()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `g` doesn't exist. + + --- +@@ -42,7 +42,7 @@ + i In argument: `y = pick_wrapper(g)`. + i In group 1: `g = 1`. + Caused by error in `pick()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `g` doesn't exist. + + # must supply at least one selector to `pick()` +@@ -73,7 +73,7 @@ + Error in `mutate()`: + i In argument: `y = pick(x)`. + Caused by error in `pick()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `x` doesn't exist. + + --- +@@ -85,7 +85,7 @@ + i In argument: `y = pick_wrapper(x)`. + i In group 1: `g = 1`. + Caused by error in `pick()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `x` doesn't exist. + + # can call `pick()` from a user defined function +@@ -96,9 +96,11 @@ + Error in `mutate()`: + i In argument: `d = my_pick()`. + i In group 1: `a = 1`. ++ Caused by error in `pick()`: ++ i In argument: `all_of(x)`. + Caused by error in `all_of()`: +- ! Can't subset columns that don't exist. +- x Column `a` doesn't exist. ++ ! Can't subset elements that don't exist. ++ x Element `a` doesn't exist. + + --- + +@@ -108,9 +110,11 @@ + Error in `mutate()`: + i In argument: `d = my_pick(y)`. + i In group 1: `a = 1`. ++ Caused by error in `pick()`: ++ i In argument: `all_of(x)`. + Caused by error in `all_of()`: +- ! Can't subset columns that don't exist. +- x Column `a` doesn't exist. ++ ! Can't subset elements that don't exist. ++ x Element `a` doesn't exist. + + # errors correctly outside mutate context + +@@ -168,7 +172,7 @@ + Error in `arrange()`: + i In argument: `..1 = pick(y)`. + Caused by error in `pick()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `y` doesn't exist. + + --- +@@ -189,7 +193,7 @@ + Error in `filter()`: + i In argument: `pick(x, a)`. + Caused by error in `pick()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `a` doesn't exist. + + --- +@@ -200,7 +204,7 @@ + Error in `filter()`: + i In argument: `pick_wrapper(x, a)`. + Caused by error in `pick()`: +- ! Can't subset columns that don't exist. ++ ! Can't select columns that don't exist. + x Column `a` doesn't exist. + + # `filter()` that doesn't use `pick()` result correctly errors +diff --git a/dplyr/tests/testthat/_snaps/select.md b/dplyr/tests/testthat/_snaps/select.md +index 9c7b1fd..70e7924 100644 +--- a/dplyr/tests/testthat/_snaps/select.md ++++ b/dplyr/tests/testthat/_snaps/select.md +@@ -30,7 +30,7 @@ + Output + <error/rlang_error> + Error in `select()`: +- ! Problem while evaluating `1 + ""`. ++ i In argument: `1 + ""`. + Caused by error in `1 + ""`: + ! non-numeric argument to binary operator + +@@ -41,7 +41,7 @@ + Output + <error/vctrs_error_subscript_oob> + Error in `select()`: +- ! Can't subset columns past the end. ++ ! Can't select columns past the end. + i Location 2 doesn't exist. + i There is only 1 column. + Code +@@ -60,7 +60,7 @@ + Output + <error/vctrs_error_subscript_oob> + Error in `select()`: +- ! Can't subset columns past the end. ++ ! Can't select columns past the end. + i Location 2 doesn't exist. + i There is only 1 column. + Code +diff --git a/dplyr/tests/testthat/_snaps/summarise.md b/dplyr/tests/testthat/_snaps/summarise.md +index 318edcb..3f80a60 100644 +--- a/dplyr/tests/testthat/_snaps/summarise.md ++++ b/dplyr/tests/testthat/_snaps/summarise.md +@@ -124,7 +124,7 @@ + <error/rlang_error> + Error in `summarise()`: + i In argument: `a = rlang::env(a = 1)`. +- i In group 1: `x = 1`, `y = 1`. ++ i In group 1: `x = 1` and `y = 1`. + Caused by error: + ! `a` must be a vector, not an environment. + Code |