Compare commits

...

23 Commits

Author SHA1 Message Date
dependabot[bot]
9f28334b7f Bump WoofWare.Myriad.Plugins from 7.0.7 to 8.0.4 (#268)
* Bump WoofWare.Myriad.Plugins from 7.0.7 to 8.0.4

---
updated-dependencies:
- dependency-name: WoofWare.Myriad.Plugins
  dependency-version: 8.0.4
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump deps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-06-23 23:00:17 +00:00
patrick-conscriptus[bot]
5cf2261d7f Automated commit (#267)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-06-22 00:52:35 +00:00
dependabot[bot]
c3589820c3 Bump ApiSurface from 4.1.20 to 4.1.21 (#265)
* Bump ApiSurface from 4.1.20 to 4.1.21

---
updated-dependencies:
- dependency-name: ApiSurface
  dependency-version: 4.1.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-06-16 18:39:50 +00:00
dependabot[bot]
5d0c205f21 Bump actions/attest-build-provenance from 2.3.0 to 2.4.0 (#266) 2025-06-16 17:59:44 +00:00
patrick-conscriptus[bot]
16135fbd56 Automated commit (#264)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-06-15 00:52:57 +00:00
dependabot[bot]
cbc51cde14 Bump FsCheck and Microsoft.NET.Test.Sdk (#263)
* Bump FsCheck and Microsoft.NET.Test.Sdk

Bumps FsCheck from 3.2.0 to 3.3.0
Bumps Microsoft.NET.Test.Sdk to 17.14.1, 17.14.1, 17.14.1

---
updated-dependencies:
- dependency-name: FsCheck
  dependency-version: 3.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 17.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

* Bump

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-06-13 22:28:06 +01:00
patrick-conscriptus[bot]
6a4b900aa9 Automated commit (#262)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-06-08 00:51:50 +00:00
patrick-conscriptus[bot]
4169289ded Automated commit (#261)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-06-01 00:57:26 +00:00
patrick-conscriptus[bot]
7df58d5309 Automated commit (#260)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-05-25 00:50:30 +00:00
patrick-conscriptus[bot]
ac4c8c245e Automated commit (#259)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-05-18 00:48:51 +00:00
patrick-conscriptus[bot]
3e79e79978 Automated commit (#258)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-05-11 00:48:12 +00:00
patrick-conscriptus[bot]
c16e7dd1ee Automated commit (#257)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-05-04 00:49:25 +00:00
dependabot[bot]
cd66617ce7 Bump FSharp.Core and WoofWare.Myriad.Plugins (#256)
* Bump FSharp.Core and WoofWare.Myriad.Plugins

Bumps [FSharp.Core](https://github.com/dotnet/fsharp) and [WoofWare.Myriad.Plugins](https://github.com/Smaug123/WoofWare.Myriad). These dependencies needed to be updated together.

Updates `FSharp.Core` from 6.0.1 to 6.0.1
- [Release notes](https://github.com/dotnet/fsharp/releases)
- [Changelog](https://github.com/dotnet/fsharp/blob/main/release-notes.md)
- [Commits](https://github.com/dotnet/fsharp/commits)

Updates `WoofWare.Myriad.Plugins` from 4.0.14 to 7.0.7
- [Release notes](https://github.com/Smaug123/WoofWare.Myriad/releases)
- [Changelog](https://github.com/Smaug123/WoofWare.Myriad/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Smaug123/WoofWare.Myriad/compare/WoofWare.Myriad.Plugins.4.0.14...WoofWare.Myriad.Plugins.7.0.7)

---
updated-dependencies:
- dependency-name: FSharp.Core
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: WoofWare.Myriad.Plugins
  dependency-version: 7.0.7
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Patrick Stevens <3138005+Smaug123@users.noreply.github.com>
2025-04-29 22:05:29 +01:00
dependabot[bot]
144f71a417 Bump actions/attest-build-provenance from 2.2.3 to 2.3.0 (#255)
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2.2.3 to 2.3.0.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](c074443f1a...db473fddc0)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-version: 2.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 23:20:49 +01:00
patrick-conscriptus[bot]
3673fc56ee Automated commit (#254)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-04-27 00:47:27 +00:00
patrick-conscriptus[bot]
5f74b41825 Automated commit (#253)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-04-20 00:47:23 +00:00
dependabot[bot]
2068007da0 Bump Spectre.Console from 0.49.1 to 0.50.0 (#251) 2025-04-14 18:56:23 +01:00
patrick-conscriptus[bot]
6fd824c065 Automated commit (#250)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-04-13 02:10:19 +00:00
dependabot[bot]
0480d5c151 Bump actions/create-github-app-token from 1 to 2 (#249)
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1 to 2.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 18:50:59 +01:00
patrick-conscriptus[bot]
9107b1b502 Automated commit (#248)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-04-06 00:45:50 +00:00
dependabot[bot]
6583b9e025 Bump FSharp.Core and WoofWare.Myriad.Plugins (#247)
* Bump fsharp-analyzers from 0.29.1 to 0.30.0

Bumps [fsharp-analyzers](https://github.com/ionide/FSharp.Analyzers.SDK) from 0.29.1 to 0.30.0.
- [Release notes](https://github.com/ionide/FSharp.Analyzers.SDK/releases)
- [Changelog](https://github.com/ionide/FSharp.Analyzers.SDK/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ionide/FSharp.Analyzers.SDK/compare/v0.29.1...v0.30.0)

---
updated-dependencies:
- dependency-name: fsharp-analyzers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump FSharp.Core and WoofWare.Myriad.Plugins

Bumps [FSharp.Core](https://github.com/dotnet/fsharp) and [WoofWare.Myriad.Plugins](https://github.com/Smaug123/WoofWare.Myriad). These dependencies needed to be updated together.

Updates `FSharp.Core` from 6.0.1 to 6.0.1
- [Release notes](https://github.com/dotnet/fsharp/releases)
- [Changelog](https://github.com/dotnet/fsharp/blob/main/release-notes.md)
- [Commits](https://github.com/dotnet/fsharp/commits)

Updates `WoofWare.Myriad.Plugins` from 4.0.13 to 4.0.14
- [Release notes](https://github.com/Smaug123/WoofWare.Myriad/releases)
- [Changelog](https://github.com/Smaug123/WoofWare.Myriad/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Smaug123/WoofWare.Myriad/compare/WoofWare.Myriad.Plugins.4.0.13...WoofWare.Myriad.Plugins.4.0.14)

---
updated-dependencies:
- dependency-name: FSharp.Core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: WoofWare.Myriad.Plugins
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

* Deps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-04-01 09:22:52 +01:00
patrick-conscriptus[bot]
48f7302391 Automated commit (#245)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-03-30 00:46:20 +00:00
Patrick Stevens
d1fa66a2e8 Fix behaviour of Explicit test fixtures (#244) 2025-03-25 21:49:50 +00:00
18 changed files with 165 additions and 79 deletions

View File

@@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "7.0.1",
"version": "7.0.2",
"commands": [
"fantomas"
]
},
"fsharp-analyzers": {
"version": "0.29.1",
"version": "0.31.0",
"commands": [
"fsharp-analyzers"
]

View File

@@ -264,7 +264,7 @@ jobs:
name: nuget-package-lib
path: packed
- name: Attest Build Provenance
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
with:
subject-path: "packed/*.nupkg"
@@ -283,7 +283,7 @@ jobs:
name: nuget-package-tool
path: packed
- name: Attest Build Provenance
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
with:
subject-path: "packed/*.nupkg"

View File

@@ -32,7 +32,7 @@ jobs:
- name: Create token
id: generate-token
uses: actions/create-github-app-token@v1
uses: actions/create-github-app-token@v2
with:
# https://github.com/actions/create-github-app-token/issues/136
app-id: ${{ secrets.APP_ID }}

View File

@@ -10,6 +10,7 @@
<Compile Include="NoAttribute.fs" />
<Compile Include="Inconclusive.fs" />
<Compile Include="RunSubProcess.fs" />
<Compile Include="TestExplicit.fs" />
<Compile Include="TestNonParallel.fs" />
<Compile Include="TestParallel.fs" />
<Compile Include="TestParallelIndividualTest.fs" />
@@ -27,7 +28,7 @@
<ItemGroup>
<PackageReference Include="FsUnit" Version="7.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/>
<PackageReference Include="NUnit" Version="4.3.2"/>
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
</ItemGroup>

24
Consumer/TestExplicit.fs Normal file
View File

@@ -0,0 +1,24 @@
namespace Consumer
open NUnit.Framework
[<TestFixture>]
module TestExplicitIndividual =
[<Explicit>]
[<Test>]
let ``This test should not be run`` () = failwith<unit> "should not call"
[<Explicit>]
[<TestFixture>]
module TestExplicitModule =
[<OneTimeSetUp>]
let setUp () = failwith<unit> "should not call: setup"
[<OneTimeTearDown>]
let tearDown () =
failwith<unit> "should not call: teardown"
[<Test>]
let ``This test should not be run because its module is explicit`` () = failwith<unit> "should not call: test"

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
@@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="FsUnit" Version="7.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/>
<PackageReference Include="NUnit" Version="4.3.2"/>
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
</ItemGroup>

View File

@@ -138,10 +138,17 @@ type TestFixture =
Tests : SingleTestMethod list
/// If this fixture has declared a parallelisability, that goes here.
Parallelize : Parallelizable<ClassParallelScope> option
/// It is possible to mark a fixture as "Explicit" or "Ignored", for example.
Modifiers : Modifier list
}
/// A test fixture about which we know nothing. No tests, no setup/teardown.
static member Empty (ty : Type) (par : Parallelizable<ClassParallelScope> option) (args : obj list list) =
static member Empty
(ty : Type)
(par : Parallelizable<ClassParallelScope> option)
(modifiers : Modifier list)
(args : obj list list)
=
{
ContainingAssembly = ty.Assembly
Type = ty
@@ -153,6 +160,7 @@ type TestFixture =
Parameters = args
Tests = []
Parallelize = par
Modifiers = modifiers
}
/// User code in the unit under test has failed somehow.

View File

@@ -170,8 +170,9 @@ WoofWare.NUnitTestRunner.IndividualTestRunMetadata.StdOut [property]: [read-only
WoofWare.NUnitTestRunner.IndividualTestRunMetadata.TestId [property]: [read-only] System.Guid
WoofWare.NUnitTestRunner.IndividualTestRunMetadata.TestName [property]: [read-only] string
WoofWare.NUnitTestRunner.IndividualTestRunMetadata.Total [property]: [read-only] System.TimeSpan
WoofWare.NUnitTestRunner.ITestProgress - interface with 5 member(s)
WoofWare.NUnitTestRunner.ITestProgress - interface with 6 member(s)
WoofWare.NUnitTestRunner.ITestProgress.OnTestFailed [method]: string -> WoofWare.NUnitTestRunner.TestMemberFailure -> unit
WoofWare.NUnitTestRunner.ITestProgress.OnTestFixtureSkipped [method]: string -> string -> unit
WoofWare.NUnitTestRunner.ITestProgress.OnTestFixtureStart [method]: string -> int -> unit
WoofWare.NUnitTestRunner.ITestProgress.OnTestMemberFinished [method]: string -> unit
WoofWare.NUnitTestRunner.ITestProgress.OnTestMemberSkipped [method]: string -> unit
@@ -346,11 +347,12 @@ WoofWare.NUnitTestRunner.TestFailure.NewTearDownFailed [static method]: WoofWare
WoofWare.NUnitTestRunner.TestFailure.NewTestFailed [static method]: WoofWare.NUnitTestRunner.UserMethodFailure -> WoofWare.NUnitTestRunner.TestFailure
WoofWare.NUnitTestRunner.TestFailure.Tag [property]: [read-only] int
WoofWare.NUnitTestRunner.TestFixture inherit obj, implements WoofWare.NUnitTestRunner.TestFixture System.IEquatable, System.Collections.IStructuralEquatable
WoofWare.NUnitTestRunner.TestFixture..ctor [constructor]: (System.Reflection.Assembly, string, System.Type, System.Reflection.MethodInfo option, System.Reflection.MethodInfo option, System.Reflection.MethodInfo list, System.Reflection.MethodInfo list, obj list list, WoofWare.NUnitTestRunner.SingleTestMethod list, WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option)
WoofWare.NUnitTestRunner.TestFixture..ctor [constructor]: (System.Reflection.Assembly, string, System.Type, System.Reflection.MethodInfo option, System.Reflection.MethodInfo option, System.Reflection.MethodInfo list, System.Reflection.MethodInfo list, obj list list, WoofWare.NUnitTestRunner.SingleTestMethod list, WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option, WoofWare.NUnitTestRunner.Modifier list)
WoofWare.NUnitTestRunner.TestFixture.ContainingAssembly [property]: [read-only] System.Reflection.Assembly
WoofWare.NUnitTestRunner.TestFixture.Empty [static method]: System.Type -> WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option -> obj list list -> WoofWare.NUnitTestRunner.TestFixture
WoofWare.NUnitTestRunner.TestFixture.Empty [static method]: System.Type -> WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option -> WoofWare.NUnitTestRunner.Modifier list -> obj list list -> WoofWare.NUnitTestRunner.TestFixture
WoofWare.NUnitTestRunner.TestFixture.Equals [method]: (WoofWare.NUnitTestRunner.TestFixture, System.Collections.IEqualityComparer) -> bool
WoofWare.NUnitTestRunner.TestFixture.get_ContainingAssembly [method]: unit -> System.Reflection.Assembly
WoofWare.NUnitTestRunner.TestFixture.get_Modifiers [method]: unit -> WoofWare.NUnitTestRunner.Modifier list
WoofWare.NUnitTestRunner.TestFixture.get_Name [method]: unit -> string
WoofWare.NUnitTestRunner.TestFixture.get_OneTimeSetUp [method]: unit -> System.Reflection.MethodInfo option
WoofWare.NUnitTestRunner.TestFixture.get_OneTimeTearDown [method]: unit -> System.Reflection.MethodInfo option
@@ -360,6 +362,7 @@ WoofWare.NUnitTestRunner.TestFixture.get_SetUp [method]: unit -> System.Reflecti
WoofWare.NUnitTestRunner.TestFixture.get_TearDown [method]: unit -> System.Reflection.MethodInfo list
WoofWare.NUnitTestRunner.TestFixture.get_Tests [method]: unit -> WoofWare.NUnitTestRunner.SingleTestMethod list
WoofWare.NUnitTestRunner.TestFixture.get_Type [method]: unit -> System.Type
WoofWare.NUnitTestRunner.TestFixture.Modifiers [property]: [read-only] WoofWare.NUnitTestRunner.Modifier list
WoofWare.NUnitTestRunner.TestFixture.Name [property]: [read-only] string
WoofWare.NUnitTestRunner.TestFixture.OneTimeSetUp [property]: [read-only] System.Reflection.MethodInfo option
WoofWare.NUnitTestRunner.TestFixture.OneTimeTearDown [property]: [read-only] System.Reflection.MethodInfo option

View File

@@ -597,15 +597,15 @@ module TestFixture =
/// Interpret this type as a [<TestFixture>], extracting the test members from it and annotating them with all
/// relevant information about how we should run them.
let parse (parentType : Type) : TestFixture =
let categories, args, par =
(([], [], None), parentType.CustomAttributes)
||> Seq.fold (fun (categories, args, par) attr ->
let categories, args, mods, par =
(([], [], [], None), parentType.CustomAttributes)
||> Seq.fold (fun (categories, args, mods, par) attr ->
match attr.AttributeType.FullName with
| "NUnit.Framework.SetUpFixtureAttribute" ->
failwith "This test runner does not support SetUpFixture. Please shout if you want this."
| "NUnit.Framework.CategoryAttribute" ->
let cat = attr.ConstructorArguments |> Seq.exactlyOne |> _.Value |> unbox<string>
cat :: categories, args, par
cat :: categories, args, mods, par
| "NUnit.Framework.TestFixtureAttribute" ->
let newArgs =
match attr.ConstructorArguments |> Seq.map _.Value |> Seq.toList with
@@ -613,38 +613,52 @@ module TestFixture =
x |> Seq.cast<CustomAttributeTypedArgument> |> Seq.map _.Value |> Seq.toList
| xs -> xs
categories, newArgs :: args, par
categories, newArgs :: args, mods, par
| "NUnit.Framework.NonParallelizableAttribute" ->
match par with
| Some _ -> failwith $"Got multiple parallelism attributes on %s{parentType.FullName}"
| None -> categories, args, Some Parallelizable.No
| None -> categories, args, mods, Some Parallelizable.No
| "NUnit.Framework.ParallelizableAttribute" ->
match par with
| Some _ -> failwith $"Got multiple parallelism attributes on %s{parentType.FullName}"
| None ->
match attr.ConstructorArguments |> Seq.toList with
| [] -> categories, args, Some (Parallelizable.Yes ClassParallelScope.Self)
| [] -> categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Self)
| [ v ] ->
match v.Value with
| :? int as v ->
match ParallelScope.ofInt v with
| ParallelScope.Fixtures ->
categories, args, Some (Parallelizable.Yes ClassParallelScope.Fixtures)
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Fixtures)
| ParallelScope.Children ->
categories, args, Some (Parallelizable.Yes ClassParallelScope.Children)
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Children)
| ParallelScope.All ->
categories, args, Some (Parallelizable.Yes ClassParallelScope.All)
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.All)
| ParallelScope.Self ->
categories, args, Some (Parallelizable.Yes ClassParallelScope.Self)
| ParallelScope.None -> categories, args, Some Parallelizable.No
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Self)
| ParallelScope.None -> categories, args, mods, Some Parallelizable.No
| v ->
failwith
$"Unexpectedly non-int value %O{v} of parallel scope in %s{parentType.FullName}"
| _ -> failwith $"unexpectedly got multiple args to Parallelizable on %s{parentType.FullName}"
| _ -> categories, args, par
| "NUnit.Framework.ExplicitAttribute" ->
let reason =
attr.ConstructorArguments
|> Seq.tryHead
|> Option.map (_.Value >> unbox<string>)
categories, args, Modifier.Explicit reason :: mods, par
| "NUnit.Framework.IgnoreAttribute" ->
let reason =
attr.ConstructorArguments
|> Seq.tryHead
|> Option.map (_.Value >> unbox<string>)
categories, args, Modifier.Ignored reason :: mods, par
| _ -> categories, args, mods, par
)
(TestFixture.Empty parentType par args, parentType.GetRuntimeMethods ())
(TestFixture.Empty parentType par mods args, parentType.GetRuntimeMethods ())
||> Seq.fold (fun state mi ->
((state, []), mi.CustomAttributes)
||> Seq.fold (fun (state, unrecognisedAttrs) attr ->
@@ -717,6 +731,8 @@ module TestFixture =
/// Run every test (except those which fail the `filter`) in this test fixture, as well as the
/// appropriate setup and tear-down logic.
///
/// If the TestFixture has modifiers that specify no tests should be run, we don't run any tests.
let run
(contexts : TestContexts)
(par : ParallelQueue)
@@ -725,6 +741,26 @@ module TestFixture =
(tests : TestFixture)
: FixtureRunResults list Task
=
match
tests.Modifiers
|> List.tryFind (
function
| Modifier.Explicit _
| Modifier.Ignored _ -> true
)
with
| Some modifier ->
let reason =
match modifier with
| Modifier.Explicit (Some reason) -> reason
| Modifier.Ignored (Some reason) -> reason
| Modifier.Ignored None -> "test fixture marked Ignore"
| Modifier.Explicit None -> "test fixture marked Explicit"
progress.OnTestFixtureSkipped tests.Name reason
Task.FromResult []
| None ->
match tests.Parameters with
| [] -> [ null ]
| args -> args |> List.map List.toArray

View File

@@ -10,6 +10,8 @@ type ITestProgress =
/// Called just before we start executing the setup logic for the given test fixture.
/// We tell you how many test methods there are in the fixture.
abstract OnTestFixtureStart : name : string -> testCount : int -> unit
/// Called when skipping the test fixture with the given name, e.g. because it's `[<Explicit>]`.
abstract OnTestFixtureSkipped : name : string -> reason : string -> unit
/// Called just before we start executing the test(s) indicated by a particular method.
abstract OnTestMemberStart : name : string -> unit
/// Called when a test fails. (This may be called repeatedly with the same `name`, e.g. if the test
@@ -32,6 +34,9 @@ module TestProgress =
let plural = if testCount = 1 then "" else "s"
writer.WriteLine $"Running test fixture: %s{name} (%i{testCount} test%s{plural} to run)"
member _.OnTestFixtureSkipped name reason =
writer.WriteLine $"Skipping test fixture (%s{reason}): %s{name}"
member _.OnTestMemberStart name =
writer.WriteLine $"Running test: %s{name}"

View File

@@ -14,7 +14,7 @@
<PackageId>WoofWare.NUnitTestRunner.Lib</PackageId>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarnOn>FS3559</WarnOn>
<WoofWareMyriadPluginVersion>4.0.13</WoofWareMyriadPluginVersion>
<WoofWareMyriadPluginVersion>8.0.4</WoofWareMyriadPluginVersion>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,5 +1,5 @@
{
"version": "0.20",
"version": "0.21",
"publicReleaseRefSpec": [
"^refs/heads/main$"
],

View File

@@ -13,6 +13,10 @@ module Progress =
member _.OnTestFixtureStart name testCount =
console.MarkupLine $"[white]Running tests: %s{Markup.Escape name}[/]"
member _.OnTestFixtureSkipped name reason =
console.MarkupLine
$"[yellow]Skipping test fixture (%s{Markup.Escape reason}): %s{Markup.Escape name}[/]"
member _.OnTestMemberFinished name =
console.MarkupLine $"[gray]Finished test: %s{Markup.Escape name}[/]"

View File

@@ -16,10 +16,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ApiSurface" Version="4.1.20" />
<PackageReference Include="FsCheck" Version="3.1.0" />
<PackageReference Include="ApiSurface" Version="4.1.21" />
<PackageReference Include="FsCheck" Version="3.3.0" />
<PackageReference Include="FsUnit" Version="7.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
</ItemGroup>

View File

@@ -35,7 +35,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.49.1" />
<PackageReference Include="Spectre.Console" Version="0.50.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<PackageDownload Include="G-Research.FSharp.Analyzers" Version="[0.13.0]" />
<PackageDownload Include="G-Research.FSharp.Analyzers" Version="[0.15.0]" />
</ItemGroup>
</Project>

6
flake.lock generated
View File

@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1742578646,
"narHash": "sha256-GiQ40ndXRnmmbDZvuv762vS+gew1uDpFwOfgJ8tLiEs=",
"lastModified": 1750386251,
"narHash": "sha256-1ovgdmuDYVo5OUC5NzdF+V4zx2uT8RtsgZahxidBTyw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "94c4dbe77c0740ebba36c173672ca15a7926c993",
"rev": "076e8c6678d8c54204abcb4b1b14c366835a58bb",
"type": "github"
},
"original": {

View File

@@ -1,13 +1,13 @@
[
{
"pname": "ApiSurface",
"version": "4.1.20",
"hash": "sha256-koWgO9FC9ax+Ij56ug8kxeyknl0yhLqnNLOUdxtqqo4="
"version": "4.1.21",
"hash": "sha256-v2adBYoE9NZPaQR3u2qq9r/9PxAM/wqi2Uiky0xGq+E="
},
{
"pname": "fantomas",
"version": "7.0.1",
"hash": "sha256-2aGD6Kjh83gmssRqqZ/Uihi7VbNqNUelX4otIfCuhTI="
"version": "7.0.2",
"hash": "sha256-BAaENIm/ksTiXrUImRgKoIXTGIlgsX7ch6ayoFjhJXA="
},
{
"pname": "Fantomas.Core",
@@ -21,13 +21,13 @@
},
{
"pname": "FsCheck",
"version": "3.1.0",
"hash": "sha256-u0Ha94EjClJ8evNSHu8d6+Dx9qYM3kV3sl1PEq9gF8s="
"version": "3.3.0",
"hash": "sha256-TFDR/uAGv4OqrMX8/reQ4faaAhH9hxTHr1T/YkNPCCU="
},
{
"pname": "fsharp-analyzers",
"version": "0.29.1",
"hash": "sha256-wfZbODwGDcPINaMy/uOLPN9aztDfJg5JXy0t+bGyy1k="
"version": "0.31.0",
"hash": "sha256-PoAvaXbXsmvVw870UsnqdD20HoBHO7u4bzoaz5DXfzM="
},
{
"pname": "FSharp.Core",
@@ -76,13 +76,13 @@
},
{
"pname": "Microsoft.CodeCoverage",
"version": "17.13.0",
"hash": "sha256-GKrIxeyQo5Az1mztfQgea1kGtJwonnNOrXK/0ULfu8o="
"version": "17.14.1",
"hash": "sha256-f8QytG8GvRoP47rO2KEmnDLxIpyesaq26TFjDdW40Gs="
},
{
"pname": "Microsoft.NET.Test.Sdk",
"version": "17.13.0",
"hash": "sha256-sc2wvyV8cGm1FrNP2GGHEI584RCvRPu15erYCsgw5QY="
"version": "17.14.1",
"hash": "sha256-mZUzDFvFp7x1nKrcnRd0hhbNu5g8EQYt8SKnRgdhT/A="
},
{
"pname": "Microsoft.NETCore.App.Host.linux-arm64",
@@ -176,13 +176,13 @@
},
{
"pname": "Microsoft.TestPlatform.ObjectModel",
"version": "17.13.0",
"hash": "sha256-6S0fjfj8vA+h6dJVNwLi6oZhYDO/I/6hBZaq2VTW+Uk="
"version": "17.14.1",
"hash": "sha256-QMf6O+w0IT+16Mrzo7wn+N20f3L1/mDhs/qjmEo1rYs="
},
{
"pname": "Microsoft.TestPlatform.TestHost",
"version": "17.13.0",
"hash": "sha256-L/CJzou7dhmShUgXq3aXL3CaLTJll17Q+JY2DBdUUpo="
"version": "17.14.1",
"hash": "sha256-1cxHWcvHRD7orQ3EEEPPxVGEkTpxom1/zoICC9SInJs="
},
{
"pname": "Myriad.Core",
@@ -199,11 +199,6 @@
"version": "3.8.38-alpha",
"hash": "sha256-gPMrVbjOZxXoofczF/pn6eVkLhjVSJIyQrLO2oljrDc="
},
{
"pname": "Newtonsoft.Json",
"version": "13.0.1",
"hash": "sha256-K2tSVW4n4beRPzPu3rlVaBEMdGvWSv/3Q1fxaDh4Mjo="
},
{
"pname": "Newtonsoft.Json",
"version": "13.0.3",
@@ -211,33 +206,33 @@
},
{
"pname": "NuGet.Common",
"version": "6.13.2",
"hash": "sha256-ASLa/Jigg5Eop0ZrXPl98RW2rxnJRC7pbbxhuV74hFw="
"version": "6.14.0",
"hash": "sha256-jDOwt3veI1GSG8CfBnf2+dJxD3E/Nmlc+vHtD4J76Ms="
},
{
"pname": "NuGet.Configuration",
"version": "6.13.2",
"hash": "sha256-z8VW1YdRDanyyRTDYRvRkSv/XPR3c/hMM1y8cNNjx0Y="
"version": "6.14.0",
"hash": "sha256-1PN9s6fhCw3wd2260U6hQ4vG3jIvcG8GIn1oQgxMXA0="
},
{
"pname": "NuGet.Frameworks",
"version": "6.13.2",
"hash": "sha256-caDyc+WgYOo43AUTjtbP0MyvYDb6JweEKDdIul61Cac="
"version": "6.14.0",
"hash": "sha256-3ViM3R1ucQMEL2hQYsivT86kI6veMQK2xDsiAcFcVQk="
},
{
"pname": "NuGet.Packaging",
"version": "6.13.2",
"hash": "sha256-lhO+SFwIYZ4aPHxIGm5ubkkE2a5Ve2xgtroRbNh7hpw="
"version": "6.14.0",
"hash": "sha256-Yafbnxs3maj55bJ1oKQiZ0QkntFUzXdhorL94YEUOhY="
},
{
"pname": "NuGet.Protocol",
"version": "6.13.2",
"hash": "sha256-5lnAHHZjy7A4vgv65AeBAs64mSNpuoUjxW3HnrMpuzY="
"version": "6.14.0",
"hash": "sha256-uLDKfs+QN1MdnuQtTES8qfNzzsmYKM6XB9pwJc4G+eo="
},
{
"pname": "NuGet.Versioning",
"version": "6.13.2",
"hash": "sha256-gmpyBpKnt+GHqgx/2uFKp+J2csbxEAy1E7WdVT117sw="
"version": "6.14.0",
"hash": "sha256-DqdOJgsphKxSvqB8b60zNPCaiLfbiu3WnUJ/90feLrY="
},
{
"pname": "NUnit",
@@ -266,8 +261,8 @@
},
{
"pname": "Spectre.Console",
"version": "0.49.1",
"hash": "sha256-tqSVojyuQjuB34lXo759NOcyLgNIw815mKXJPq5JFDo="
"version": "0.50.0",
"hash": "sha256-3MNgumQSXzuXVGj7kLb5FMkTH/LoFohMvUjAZ7nyHfo="
},
{
"pname": "System.Collections.Immutable",
@@ -286,8 +281,8 @@
},
{
"pname": "System.Formats.Asn1",
"version": "8.0.1",
"hash": "sha256-may/Wg+esmm1N14kQTG4ESMBi+GQKPp0ZrrBo/o6OXM="
"version": "6.0.0",
"hash": "sha256-KaMHgIRBF7Nf3VwOo+gJS1DcD+41cJDPWFh+TDQ8ee8="
},
{
"pname": "System.IO.Abstractions",
@@ -304,6 +299,11 @@
"version": "4.5.5",
"hash": "sha256-EPQ9o1Kin7KzGI5O3U3PUQAZTItSbk9h/i4rViN3WiI="
},
{
"pname": "System.Memory",
"version": "4.6.3",
"hash": "sha256-JgeK63WMmumF6L+FH5cwJgYdpqXrSDcgTQwtIgTHKVU="
},
{
"pname": "System.Private.Uri",
"version": "4.3.0",
@@ -314,6 +314,11 @@
"version": "1.6.0",
"hash": "sha256-JJfgaPav7UfEh4yRAQdGhLZF1brr0tUWPl6qmfNWq/E="
},
{
"pname": "System.Reflection.Metadata",
"version": "8.0.0",
"hash": "sha256-dQGC30JauIDWNWXMrSNOJncVa1umR1sijazYwUDdSIE="
},
{
"pname": "System.Runtime",
"version": "4.3.1",
@@ -361,13 +366,13 @@
},
{
"pname": "WoofWare.Myriad.Plugins",
"version": "4.0.13",
"hash": "sha256-ak0YjK+b8ruLLVgwkR2h2O8wmJkdtNZGQTM3j3BxVgk="
"version": "8.0.4",
"hash": "sha256-/cX7B1QDOnyYRaetl1pQRkeVNLA7vP25TJfBZhi2j/c="
},
{
"pname": "WoofWare.Myriad.Plugins.Attributes",
"version": "3.6.8",
"hash": "sha256-k8Oum0xbv90yHmYr770w7uskMcAwZfyFI5uHaes5Yxg="
"version": "3.6.11",
"hash": "sha256-UI8wT1a3CuQUeXb1qIHCiimGJ1qBjK9ZOQN2/N5fNdg="
},
{
"pname": "WoofWare.PrattParser",
@@ -376,7 +381,7 @@
},
{
"pname": "WoofWare.Whippet.Fantomas",
"version": "0.3.1",
"hash": "sha256-i5oiqcrxzM90Ocuq5MIu2Ha5lV0aYu5nCvuwmFqp6NA="
"version": "0.6.3",
"hash": "sha256-FkW/HtVp8/HE2k6d7yFpnJcnP3FNNe9kGlkoIWmNgDw="
}
]