mirror of
https://github.com/Smaug123/unofficial-nunit-runner
synced 2025-10-08 18:48:40 +00:00
Recognise parallelism attributes (#76)
This commit is contained in:
49
Consumer/TestParallel.fs
Normal file
49
Consumer/TestParallel.fs
Normal file
@@ -0,0 +1,49 @@
|
||||
namespace Consumer
|
||||
|
||||
open NUnit.Framework
|
||||
open FsUnitTyped
|
||||
|
||||
[<TestFixture>]
|
||||
[<Parallelizable>]
|
||||
module TestParallelDefault =
|
||||
|
||||
let defaults = List.init 100 id
|
||||
|
||||
[<TestCaseSource(nameof defaults)>]
|
||||
let ``Default thing`` (i : int) = i |> shouldEqual i
|
||||
|
||||
[<TestFixture>]
|
||||
[<Parallelizable(ParallelScope.All)>]
|
||||
module TestParallelAllScope =
|
||||
|
||||
let defaults = List.init 100 id
|
||||
|
||||
[<TestCaseSource(nameof defaults)>]
|
||||
let ``Default thing`` (i : int) = i |> shouldEqual i
|
||||
|
||||
[<TestFixture>]
|
||||
[<Parallelizable(ParallelScope.Self)>]
|
||||
module TestParallelSelfScope =
|
||||
|
||||
let defaults = List.init 100 id
|
||||
|
||||
[<TestCaseSource(nameof defaults)>]
|
||||
let ``Default thing`` (i : int) = i |> shouldEqual i
|
||||
|
||||
[<TestFixture>]
|
||||
[<Parallelizable(ParallelScope.Children)>]
|
||||
module TestParallelChildrenScope =
|
||||
|
||||
let defaults = List.init 100 id
|
||||
|
||||
[<TestCaseSource(nameof defaults)>]
|
||||
let ``Default thing`` (i : int) = i |> shouldEqual i
|
||||
|
||||
[<TestFixture>]
|
||||
[<Parallelizable(ParallelScope.Fixtures)>]
|
||||
module TestParallelFixturesScope =
|
||||
|
||||
let defaults = List.init 100 id
|
||||
|
||||
[<TestCaseSource(nameof defaults)>]
|
||||
let ``Default thing`` (i : int) = i |> shouldEqual i
|
Reference in New Issue
Block a user