Add more information to default where: block check names#1773
Open
jpolitz wants to merge 1 commit into
Open
Conversation
All check blocks come with a default name.
For where blocks, it is simply a copy of the function name.
With new CLI options like --checks "only:<pat>" that do substring matching,
it's useful to have more information in these names. For example, a common case
in an autograder might involve matching the name of a test case to express
``the name of the where block for the function called f''.
This changes the where block naming from:
file:///Users/joe/src/pyret-lang/test.arr:3:0-7:3: f (0/1)
line 6, column 2: failed because:
Values not equal 6 8
Passed: 0; Failed: 1; Ended in Error: 0; Total: 1
to:
file:///Users/joe/src/pyret-lang/test.arr:3:0-7:3: f() where block (0/1)
line 6, column 2: failed because:
Values not equal 6 8
Passed: 0; Failed: 1; Ended in Error: 0; Total: 1
Member
Author
Member
Author
|
Just to be clear the above is the CLI output for |
Collaborator
|
Is there already a convention in errors and messages whether the |
Member
|
Obvious argument: () is misleading as it's not the signature of the function Obvious counterargument: should the test name include the names of the function arguments? In examplar situations, that parameter names might not be stable/consistent. At minimum, I'd write (...) instead, but I wonder what a useful middle-ground might be for making the function header more accurate in these test names. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All check blocks come with a default name.
For where blocks, it is simply a copy of the function name.
With new CLI options like
--checks "only:<pat>"that do substring matching, it's useful to have more information in these names. For example, a common case in an autograder might involve matching the name of a test case to express ``the name of the where block for the function called f''.This changes the where block naming from:
to: