Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ebirdfreq, associated tests, and update deprecated testthat functions, closes #52 #53

Merged
merged 2 commits into from
Mar 10, 2017

Conversation

sebpardo
Copy link
Contributor

I updated ebirdfreq to reflect changes to the way the website links to the .csv download, removed a broken link in the documentation for this function, and fixed one associated test that was throwing an error. Interestingly, expect_error thinks the error messages are different even though they seem identical:

expect_error(ebirdfreq("hotspots", "L196159", 1900, 1902, long = FALSE), 
                         "Internal Server Error (HTTP 500).")
# Error: error$message does not match "Internal Server Error (HTTP 500).".
# Actual value: "Internal Server Error (HTTP 500)."

However, the following regexp matches the whole string with no problem (I kept this regexp in the test):

expect_error(ebirdfreq("hotspots", "L196159", 1901, 1902, long = FALSE), 
                         regexp = "^Internal Server Error \\(HTTP 500\\)\\.$")

Any ideas why @sckott ?

As a separate commit, I updated all testthat functions that were deprecated; they were producing warnings in the tests.

@codecov-io
Copy link

codecov-io commented Mar 10, 2017

Codecov Report

Merging #53 into master will decrease coverage by 0.63%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
- Coverage   80.95%   80.32%   -0.64%     
==========================================
  Files          11       11              
  Lines         252      249       -3     
==========================================
- Hits          204      200       -4     
- Misses         48       49       +1
Impacted Files Coverage Δ
R/ebirdfreq.R 92.1% <100%> (-3.02%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46e70d9...92a4319. Read the comment docs.

@sebpardo sebpardo added this to the v0.4.0 milestone Mar 10, 2017
@sebpardo sebpardo merged commit 6248ce6 into ropensci:master Mar 10, 2017
@sckott
Copy link
Contributor

sckott commented Mar 10, 2017

for

expect_error(ebirdfreq("hotspots", "L196159", 1900, 1902, long = FALSE), 
                         "Internal Server Error (HTTP 500).")

i think you just need to escape the parentheses

@sebpardo
Copy link
Contributor Author

You're right, I totally missed that. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants