You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this doc, values of ParallelScope are only valid based on what member the Parallelizable is being used on. For example, ParalleScope.Children cannot be used on methods. Writing an analyzer to inform the developer of improper value usage would be a nice thing to have.
Edit by mikkelbu: Corrected link.
The text was updated successfully, but these errors were encountered:
From the code in ParallelizableAttribute.cs and the example below it seems that the validation is only for [Parallelizable(ParallelScope.Children)] and [Parallelizable(ParallelScope.Fixtures)] on test methods.
using NUnit.Framework;// [assembly: Parallelizable(ParallelScope.Self)] // does not have an effectnamespaceParallelScopeTest{[TestFixture]publicclassClass1{[Test]publicvoidTest1(){
Assert.Pass();}// [Parallelizable(ParallelScope.Children)] // Message: May not specify ParallelScope.Children on a non-parameterized test method[Test]publicvoidTest2(){
Assert.Pass();}// [Parallelizable(ParallelScope.Fixtures)] // Message: May not specify ParallelScope.Fixtures on a test method[Test]publicvoidTest3(){
Assert.Pass();}}}
Verifies and reports the following:
* (Warning) ParallelScope.Self on assembly level as it has no effect
* (Error) ParallelScope.Children on a non-parameterized test method
* (Error) ParallelScope.Fixtures on a test method
Fixesnunit#64
According to this doc, values of
ParallelScope
are only valid based on what member theParallelizable
is being used on. For example,ParalleScope.Children
cannot be used on methods. Writing an analyzer to inform the developer of improper value usage would be a nice thing to have.Edit by mikkelbu: Corrected link.
The text was updated successfully, but these errors were encountered: