-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unit tests fail on R-devel: Error (test_build_log_entry.R:69:3): stack trace is correct + Failure (test_build_log_output.R:57:3): log output is correct #64
Comments
Brodie Gaslam wrote an email on Wed, 12 May 2021 and pointed me to the cause of the problem (thanks a lot for this execellent analysis and work :-)
|
First diagnoses via debugging using R-devel on Ubuntu 20.04: This problem is no bug in
This misleading error message is caused by a wrong function call parameter in this unit test line: I forgot the The correct syntax is:
After fixing this all three unit tests fail for the same reason as described by Brodie above: Due to the new width counting of (trailing?) new lines which cause a different result then expected before (defined via "old" R versions) as soon as the stack trace string is "cut" to the given width set by
Example (simplified excerpt of a stack trace line of the second failing unit test): Expected:
Actual with R-devel:
Observe that the actual result contains now one more character since the trailing new line is no longer counted as contributing to the width (count) where the output shall be cut if it is longer! |
Approach to fix the failing unit tests:
|
The above approach did not work as expected:
I did not want to introduce 3-way if-branching in the unit tests and decided to increment the maximum value of the Now the units do work again on the above R versions. |
I have submitted the new package version 1.2.3 at CRAN today |
After fixing an moved link and re-submitting the package as version 1.2.4 the updated version is on CRAN now since 10 minutes :-) https://cran.r-project.org/web/packages/tryCatchLog/index.html Thanks a lot again to Brodie Gaslam for his valuable work to narrow down the cause of the problems, this really saved me a lot of time :-) |
Merge branch 'bugfix/64_unit_test_fail_on_R-devel' # Conflicts: # DESCRIPTION # NEWS.md
Prof. Brian Ripley sent an email on Tue, 11 May 2021:
According to the logs the unit tests fail only on R-devel and R patched:
The failing unit tests are these three ones:
and
and
The text was updated successfully, but these errors were encountered: