hugheylab/pmparser

citation tests

Closed this issue · 6 comments

The second test is failing on my machine. Also, the first test will only pass until the figshare repo gets updated, because that will change the output of getCitationInfo.

https://github.com/hugheylab/pubmedparser/blob/c0a270c963a1b31ec5e0a6a581752cc9af521d0c/tests/testthat/test_get_citation.R#L8

I'll check if there's something weird with my machine re the second test, since it passed on circle ci.

Re getCitationInfo, how could you test the output in a way that's robust to updates?

The problem with the failing test was with my use of tempdir(). I should've been using tempfile().

Does the collectionID argument relate to a different collection that might not change? like a previous one?

Sorry, hit the wrong button.

Tests discussed:

  • Returns Data.table
  • Column Names match
  • 1 Row

Fixed here: 011286c