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

brace_linter() covers test_that() without braces #2808

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MichaelChirico
Copy link
Collaborator

Closes #2292

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.64%. Comparing base (500a38c) to head (5d1e03d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2808   +/-   ##
=======================================
  Coverage   99.63%   99.64%           
=======================================
  Files         126      126           
  Lines        6936     6946   +10     
=======================================
+ Hits         6911     6921   +10     
  Misses         25       25           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@AshesITR AshesITR left a comment

Choose a reason for hiding this comment

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

Interestingly I found two odd usages of test_that on GitHub https://github.com/search?q=%2Ftest_that%5C(%5C%7B%2F&type=code

  1. Piping the test name.
  2. Supplying the description as a keyword argument.

Both break the positional assumption.

WDYT about supporting one or both?

@MichaelChirico
Copy link
Collaborator Author

Interestingly I found two odd usages of test_that on GitHub https://github.com/search?q=%2Ftest_that%5C(%5C%7B%2F&type=code

  1. Piping the test name.
  2. Supplying the description as a keyword argument.

Both break the positional assumption.

WDYT about supporting one or both?

I don't think it's worth the investment. If eventually we have a good general framework for handling odd cases like that, we can include it in a sweep of all linters. But I also don't see much demand for that besides from us maintainers recognizing we're being less-than-perfect on this front.

I see 28 hits there vs. >300,000 for just test_that[(]['"], and at least one of them is Lionel presumably himself doing some edge case testing :)

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.

Encourage braced expression in test_that() calls
2 participants