11context(" Study external data" )
22
33if (identical(Sys.getenv(" NOT_CRAN" ), " true" )) {
4- all_sources <- c(" doi" , " pubmed_id" , " external_data_url" , " popset_ids" , " nucleotide_ids" )
4+ all_sources <- c(
5+ " doi" ,
6+ " pubmed_id" ,
7+ " external_data_url" ,
8+ " popset_ids" ,
9+ " nucleotide_ids"
10+ )
511 all_data <- study_external_IDs(" pg_1940" )
612}
713
814test_that(" We can recover dois, pmids, NCBI IDs" , {
915 skip_on_cran()
16+ skip(" NCBI seems to be down" )
1017 expect_that(all_data , is_a(" study_external_data" ))
1118 expect_named(all_data )
1219})
1320
1421test_that(" We can handle studies with missing external IDs" , {
1522 skip_on_cran()
23+ skip(" NCBI seems to be down" )
1624 expect_warning(
17- missing_data <- study_external_IDs(" ot_97" ), " skipping NCBI"
25+ missing_data <- study_external_IDs(" ot_97" ),
26+ " skipping NCBI"
1827 )
1928 expect_named(missing_data )
2029 expect_that(missing_data , is_a(" study_external_data" ))
@@ -33,6 +42,7 @@ context("Taxon external data")
3342
3443test_that(" We can recover external IDs for Open Tree taxa" , {
3544 skip_on_cran()
45+ skip(" NCBI seems to be down" )
3646 gibbon_IDs <- taxon_external_IDs(712902 )
3747 expect_that(gibbon_IDs , is_a(" data.frame" ))
3848 expect_equal(names(gibbon_IDs ), c(" source" , " id" ))
0 commit comments