-
Notifications
You must be signed in to change notification settings - Fork 67
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
Negative unit test for bad patches #197
base: main
Are you sure you want to change the base?
Conversation
Making a unit test out of the discussion from https://rosettacommons.slack.com/archives/C1YUVUD5E/p1728433183443519
It looks like the test ran and passed but didn't output any log. Maybe that is expected for unit tests? |
How does beautification work now with the fork system? |
auto mutable_type = patch.apply( r.type() ); | ||
reached_the_expected_point = true; | ||
auto res_type = core::chemical::ResidueType::make( *mutable_type ); | ||
TS_ASSERT(false); // the previous line should have thrown an error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might recommend TS_ASSERT_THROWS_ANYTHING()
(and/or TS_ASSERT_THROWS_NOTHING()
) -- see test/core/scoring/ScoreFunctionFactory.cxxtest.hh
for example usage.
I think that if "Maintainers are allowed to edit this pull request." is checked, it should be possible to manually queue the "beautify" test on the test server, and have the test submit the update to the PR ... that said, I'm not sure if we have all the settings lined up to have that work in the new system. (I've submitted a test case and we'll see if it works.) Failing that, you can always run things locally & manually with |
@JackMaguire fyi: passed unit test logs are cleared by default |
Also, our old "beautify" button should still work (i think 🤔)… |
Hmm I don't actually have a computer that I can use for beautification. The testing server seemed to get confused:
|
Hm… looks like out current restriction actually prevent beautification procedure to commit results (see logs here https://b3.graylab.jhu.edu/test/842562). I added this as topic for the next devel meting to see how it will be best to workaround this issue. |
@lyskov That's for beautification of the |
Ah, i see, - yeah, our old approach will not work with forked-PR, hm… 🤔 |
Sorry to be difficult about this. It is just that my only personal computer is a macbook air and I don't have developer tools installed, so I can't run any of this locally. Would it be a lot of work to have the testing server spit out a |
@JackMaguire PR #204 is merged now. If you can merge |
Thanks for adding that, @roccomoretti ! The beautification tests pass, the new unit test passes, and I updated the code to use TS_ASSERT_THROWS_ANYTHING. Does this look good to merge? |
I'm making a unit test out of my recent post in the debugging channel. It may not be the perfect error message but it is better than a seg fault and invites the user to expand upon the error message.
I wrote this code in the browser so I'm expecting a bit of beautification and typo correction to be necessary.