Skip to content

Commit

Permalink
correction of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyi committed Jan 28, 2025
1 parent 5bdc88d commit 09213bd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: restatapi
Type: Package
Title: Search and Retrieve Data from Eurostat Database
Date: 2025-01-27
Version: 0.24.1
Version: 0.24.2
Encoding: UTF-8
Authors@R: c(person("Mátyás", "Mészáros", email = "[email protected]", role = c("aut", "cre")),
person("Sebastian", "Weinand", role = "ctb"))
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# restatapi 0.24.2

- correction of test because of the changed Table of Content

# restatapi 0.24.1

- correction of outdated URLs and documentation
- - CRAN release
- CRAN release

# restatapi 0.24.0

Expand Down
8 changes: 4 additions & 4 deletions inst/tinytest/test_restatapi.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ if (!is.null(dt1)&is.data.frame(dt1)&!is.null(dt2)&is.data.frame(dt2)){
} else {not_checked<-paste(not_checked,"18-21",sep=",")}

if (!is.null(xml_toc)){
testid3<-xml_toc$code[xml_toc$values==min(xml_toc$values)][1]
testid3<-xml_toc$code[xml_toc$values==min(xml_toc$values[xml_toc$values>10])][1]
if (!is.na(testid3)){
expect_equal(nrow(get_eurostat_raw(testid3,verbose=FALSE)),min(xml_toc$values)) # 22
expect_equal(nrow(get_eurostat_raw(testid3,check_toc=TRUE,verbose=FALSE)),min(xml_toc$values)) # 23
expect_equal(nrow(get_eurostat_raw(testid3,verbose=FALSE)),min(xml_toc$values[xml_toc$values>10])) # 22
expect_equal(nrow(get_eurostat_raw(testid3,check_toc=TRUE,verbose=FALSE)),min(xml_toc$values[xml_toc$values>10])) # 23
expect_message(bt1<-get_eurostat_bulk("blabla",check_toc=TRUE,verbose=FALSE)) # 24
expect_equal(bt1,NULL) # 25
expect_equal(nrow(get_eurostat_data(testid3,verbose=FALSE)),min(xml_toc$values)) # 26
expect_equal(nrow(get_eurostat_data(testid3,verbose=FALSE)),min(xml_toc$values[xml_toc$values>10])) # 26
} else {not_checked<-paste(not_checked,"22-26",sep=",")}
testid3<-xml_toc$code[is.na(xml_toc$values)&is.na(xml_toc$lastUpdate)&is.na(xml_toc$downloadLink.tsv)][1]
# testid3<-xml_toc$code[(xml_toc$shortDescription=="")&is.na(xml_toc$metadata.html)&is.na(xml_toc$metadata.sdmx)][1]
Expand Down

0 comments on commit 09213bd

Please sign in to comment.