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

Test for exact output from a simple report #3393

Closed
djmitche opened this issue Apr 23, 2024 · 2 comments
Closed

Test for exact output from a simple report #3393

djmitche opened this issue Apr 23, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@djmitche
Copy link
Collaborator

#3389 removes an accidentally-merged debug print that @Bckempa noticed made it all the way to the 3.0.1 release.

As @ryneeverett suggests, this wasn't caught in tests because they all check that the output contains some particular string -- if there's extra stuff that doesn't cause the test to fail. In general, that's good, but we should probably also have some tests that assert that exactly the expected output is present, for some simple kinds of output.

Maybe a good one of those would be task ls for an empty task database, along with the necessary rc.foo=.. to silence things that might change like task news output.

@djmitche djmitche added the good first issue Good for newcomers label Apr 23, 2024
@felixschurk
Copy link
Collaborator

This is only half true, some tests especially the python tests would have caught that e.g.

70: # FAIL: AssertionError on file /usr/lib64/python3.12/unittest/case.py line 58 in testPartExecutor: 'yield':
70: #       '1' unexpectedly found in '3.0.1'

however as noted in #3388 the tests were not run...

But I guess its still a valid test case.

@djmitche
Copy link
Collaborator Author

Ah, good to know this would have been caught!

I think those test cases will have broader applicability -- and be less fragile -- than the one suggested here. So I'll close this issue.

@djmitche djmitche closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants