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

Not accurate test counting in normal and Rmarkdown runs #1898

Closed
Ahill25 opened this issue Nov 14, 2023 · 4 comments
Closed

Not accurate test counting in normal and Rmarkdown runs #1898

Ahill25 opened this issue Nov 14, 2023 · 4 comments

Comments

@Ahill25
Copy link

Ahill25 commented Nov 14, 2023

Hey all, I have been trying to get an accurate test count on testthat package testing but seem to be running into faults. When running a test it may give numbers like shown below on the command line but when put into a dataframe the results are missing 26 tests. Where are these test numbers going? How is the result on the command line different from the actual variable assigned results? Thanks.

image

@hadley
Copy link
Member

hadley commented Nov 29, 2023

I don't really understand what you're asking here. Counting tests isn't an advertised feature of testthat.

@Ahill25
Copy link
Author

Ahill25 commented Nov 29, 2023

I don't really understand what you're asking here. Counting tests isn't an advertised feature of testthat.

The top line is test_package() being ran and assigned to a variable in an instance of R. The line under that is putting the variable into a dataframe. The 'passed' results in the dataframe come out to be 1520 and not 1544 as it says in command line.

@Ahill25
Copy link
Author

Ahill25 commented Nov 29, 2023

#1366 (comment) This is a close answer to what I am trying to find but what if a test errors? I would have to manually count expectations I presume?

@hadley
Copy link
Member

hadley commented Nov 29, 2023

I don't ever use that functionality, so I don't have any insight, sorry.

@hadley hadley closed this as completed Oct 22, 2024
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

No branches or pull requests

2 participants