-
Notifications
You must be signed in to change notification settings - Fork 32
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
NUnit2023 fires on variables of type Task #258
Comments
Related to this:
Raising NUnit2021 when comparing tasks for Equals:
|
Yes, because NUnit waits for tasks in asserts, you don't have to await it explicitly, i.e. this one is perfectly valid:
Still, probably non-generic Task case was missed here. |
Are you sure about NUnit implicitly waiting? Your example fails on my machine:
I fixed my original problem by changing the code in AssertHelper.UnwrapActualType to:
Are you happy for me to raise a PR for that? |
No, you're right. I mix it up with I suppose that Task handling should be reworked to account for them better. |
The following code results in an 'The type of the actual argument - 'void' - can never be null.
The source code does an Unwrap of an awaitable type regardless if it is actually awaited:
Roslyn should already do that for us when called like:
The text was updated successfully, but these errors were encountered: