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
Add method to set Until date when ignoring TestCaseData #3277
Conversation
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.
This looks good to me @abborg. I've only a couple of very minor comments.
Ps. The PR will need one additional review before it can be merged to master.
Thank you for reviewing the changes and providing feedback @mikkelbu! I'll make the amendments you noted. |
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.
The implementation looks fine to me, but I am wondering whether this is the API we want. Just commenting for now, will enlarge on the issue itself, and review again when we agree on the API.
This looks good to me too, but I agree with @CharliePoole about discussing the API. I am fine with adding an overload with a second parameter as it matches the I think the |
{ | ||
this.RunState = RunState.Ignored; | ||
string reason = (string)this.Properties.Get(PropertyNames.SkipReason); | ||
reason = string.Format("Ignoring until {0}. {1}", datetime.ToString("u"), reason); |
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.
We need to deduplicate this code. I just realized that this is a copy of the code in IgnoreAttribute.
@nunit/framework-team Any thoughts on where we should keep common code like this?
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 agree, but this PR has been out there for many months. Other than this, I think it looks good and can be merged. Maybe we leave the refactoring to another PR?
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.
@rprouse That sounds good!
{ | ||
this.RunState = RunState.Ignored; | ||
string reason = (string)this.Properties.Get(PropertyNames.SkipReason); | ||
reason = string.Format("Ignoring until {0}. {1}", datetime.ToString("u"), reason); |
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 agree, but this PR has been out there for many months. Other than this, I think it looks good and can be merged. Maybe we leave the refactoring to another PR?
@rprouse The copy/paste is the only outstanding thing that bothers me. #3277 (comment) |
This PR has been superseded by #3544. |
Resolves #3275
Provide a simple method to set the IgnoreUntilDate on a test case defined by TestCaseData. The behavior is the same as
IgnoreAttribute
and only applies the ignored status if the test is not already set toNotRunnable
and theUntil
date has not been reached yet.