Skip to content

Conversation

@howardbaik
Copy link
Contributor

@howardbaik howardbaik commented Sep 19, 2025

Simon, I ended up using cli::format_message() to see cli-styled messages from testthat::expect(). One other change I've made since Tidy Dev Day is to account for single-line error messages (i.e. Error: Expecting ',' delimiter: line 165 column 13 (char 3699) with an if else statement.

Fixes #148

Copy link
Collaborator

@simonpcouch simonpcouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for making this happen! Was great to meet you.

These changes seem reasonable, though I'm a bit too scatterbrained post-conf to review thoughtfully at the moment. I'm about to step away from work for 3 weeks—I'll come back to this once I'm back at work!

Safe travels to you on your way back from conf.

@howardbaik
Copy link
Contributor Author

Sounds good. Was great to meet you too, and have a great vacation! Talk to you in 3 weeks 😄

Copy link
Collaborator

@simonpcouch simonpcouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving these changes so much. Thank you!!

Pushing a few edits here in a moment that are mostly style-related; no changes to functionality.

"The generated log did not pass the pydantic model:",
glue::glue("{{.field {result[1]}}}")
))
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To simplify this control flow, I am going to remove this else and then return early from the if condition.

glue::glue("{{.field {result[1]}}}")
))
} else {
# Get rid of elements starting with "For further information visit"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove most of these "what" comments in favor of one "why" comment

    # Make the result more readable by removing redundant elements
    # and formatting indices with cli (#159)

@simonpcouch simonpcouch merged commit 613352c into tidyverse:main Oct 6, 2025
11 of 12 checks passed
simonpcouch added a commit that referenced this pull request Oct 6, 2025
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.

print linebreaks in expect_valid_log()

2 participants