From cdf4a70f9456becb1a921221b88b10891c8c7539 Mon Sep 17 00:00:00 2001 From: jangorecki Date: Wed, 21 Oct 2020 11:10:12 +0300 Subject: [PATCH 1/2] update unit test err msg, closes #4769 --- NEWS.md | 4 +++- inst/tests/tests.Rraw | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 5e3fb88de6..6411ae8882 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ **Benchmarks are regularly updated: [here](https://h2oai.github.io/db-benchmark/)** -# data.table [v1.13.3](https://github.com/Rdatatable/data.table/milestone/20) (in development) +# data.table [v1.13.3](https://github.com/Rdatatable/data.table/milestone/21) (in development) ## NEW FEATURES @@ -10,6 +10,8 @@ ## NOTES +1. Within hours after 1.13.2 release to CRAN there was a change in error message of base R that broke one of our unit tests, [#4769](https://github.com/Rdatatable/data.table/issues/4769). + # data.table [v1.13.2](https://github.com/Rdatatable/data.table/milestone/19?closed=1) (19 Oct 2020) diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index f5f7136641..60ecd393fb 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -4195,7 +4195,7 @@ setNumericRounding(old_rounding) DT = data.table(id=INT(1,2,1), val1=3:1, val2=3:1, val3=list(2:3,4:6,7:10)) # 5380 test(1199.1, DT[, sum(.SD), by=id, .SDcols=2:3], data.table(id=1:2, V1=INT(8,4))) #875 made the .SD case work -test(1199.2, DT[, sum(.SD), by=id], error="only defined on a data frame with all numeric variables") +test(1199.2, DT[, sum(.SD), by=id], error="only defined on a data frame with all numeric") test(1199.3, DT[, sum(val3), by=id], error="Type 'list' not supported by GForce sum [(]gsum[)]. Either.*or turn off") # Selection of columns, copy column to maintain the same as R <= 3.0.2, in Rdevel, for now From 3096095e65bbb25dd90204e9d19bc4cccadd04ce Mon Sep 17 00:00:00 2001 From: Matt Dowle Date: Fri, 30 Oct 2020 15:27:25 -0600 Subject: [PATCH 2/2] pattern relaxed to minimal, and news item embellished --- NEWS.md | 2 +- inst/tests/tests.Rraw | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 6411ae8882..f7c46a17b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,7 +10,7 @@ ## NOTES -1. Within hours after 1.13.2 release to CRAN there was a change in error message of base R that broke one of our unit tests, [#4769](https://github.com/Rdatatable/data.table/issues/4769). +1. Continuous daily testing by CRAN using latest daily R-devel revealed, within one day of the change to R-devel, that a future version of R would break one of our tests, [#4769](https://github.com/Rdatatable/data.table/issues/4769). The characters "-alike" were added into one of R's error messages, so our too-strict test which expected the error `only defined on a data frame with all numeric variables` will fail when it sees the new error message `only defined on a data frame with all numeric-alike variables`. We have relaxed the pattern the test looks for to `data.*frame.*numeric` well in advance of the future version of R being released. Readers are reminded that CRAN is not just a host for packages. It is also a giant test suite for R-devel. For more information, [behind the scenes of cran, 2016](https://www.h2o.ai/blog/behind-the-scenes-of-cran/). # data.table [v1.13.2](https://github.com/Rdatatable/data.table/milestone/19?closed=1) (19 Oct 2020) diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index 60ecd393fb..e3753ebd2d 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -4195,7 +4195,7 @@ setNumericRounding(old_rounding) DT = data.table(id=INT(1,2,1), val1=3:1, val2=3:1, val3=list(2:3,4:6,7:10)) # 5380 test(1199.1, DT[, sum(.SD), by=id, .SDcols=2:3], data.table(id=1:2, V1=INT(8,4))) #875 made the .SD case work -test(1199.2, DT[, sum(.SD), by=id], error="only defined on a data frame with all numeric") +test(1199.2, DT[, sum(.SD), by=id], error="data.*frame.*numeric") # this is R's error message so use flexible string pattern to insulate from minor changes in R, #4769 test(1199.3, DT[, sum(val3), by=id], error="Type 'list' not supported by GForce sum [(]gsum[)]. Either.*or turn off") # Selection of columns, copy column to maintain the same as R <= 3.0.2, in Rdevel, for now