From b58c18f4583cc329f22fcdb951588a6b9a1a074a Mon Sep 17 00:00:00 2001 From: Dag Brattli Date: Thu, 28 May 2026 21:40:53 +0200 Subject: [PATCH 1/2] chore(test): remove unused xunit dependencies Tests use a custom Fable.Python.Testing.FactAttribute that Fable lowers to a pytest test_ prefix; no test file references Xunit. The .NET test entry point was already a no-op returning 0. Drop xunit, xunit.runner.visualstudio, and Microsoft.NET.Test.Sdk to clear the deprecation warning and remove transitive bloat. Co-Authored-By: Claude Opus 4.7 (1M context) --- paket.dependencies | 3 --- paket.lock | 28 ---------------------------- test/paket.references | 5 ----- 3 files changed, 36 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index 93fa3e4..3106fad 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -14,9 +14,6 @@ group Test nuget FSharp.Core nuget Fable.Core >= 5.0.0 lowest_matching: true - nuget Microsoft.NET.Test.Sdk ~> 16 - nuget xunit ~> 2 - nuget xunit.runner.visualstudio ~> 2 group Examples source https://api.nuget.org/v3/index.json diff --git a/paket.lock b/paket.lock index 60a08c4..3e43c3b 100644 --- a/paket.lock +++ b/paket.lock @@ -29,31 +29,3 @@ NUGET Fable.Core (5.0) FSharp.Core (>= 4.7.2) FSharp.Core (11.0.100) - Microsoft.CodeCoverage (18.4) - Microsoft.NET.Test.Sdk (16.11) - Microsoft.CodeCoverage (>= 16.11) - Microsoft.TestPlatform.TestHost (>= 16.11) - Microsoft.TestPlatform.ObjectModel (18.4) - System.Reflection.Metadata (>= 8.0) - Microsoft.TestPlatform.TestHost (18.4) - Microsoft.TestPlatform.ObjectModel (>= 18.4) - Newtonsoft.Json (>= 13.0.3) - Newtonsoft.Json (13.0.4) - System.Collections.Immutable (10.0.6) - System.Reflection.Metadata (10.0.6) - System.Collections.Immutable (>= 10.0.6) - xunit (2.9.3) - xunit.analyzers (>= 1.18) - xunit.assert (>= 2.9.3) - xunit.core (2.9.3) - xunit.abstractions (2.0.3) - xunit.analyzers (1.27) - xunit.assert (2.9.3) - xunit.core (2.9.3) - xunit.extensibility.core (2.9.3) - xunit.extensibility.execution (2.9.3) - xunit.extensibility.core (2.9.3) - xunit.abstractions (>= 2.0.3) - xunit.extensibility.execution (2.9.3) - xunit.extensibility.core (2.9.3) - xunit.runner.visualstudio (2.8.2) diff --git a/test/paket.references b/test/paket.references index 720902f..c2bdcd7 100644 --- a/test/paket.references +++ b/test/paket.references @@ -2,8 +2,3 @@ group Test FSharp.Core Fable.Core - -Microsoft.NET.Test.Sdk - -xunit -xunit.runner.visualstudio From 8ca16499e88b84c5593d988844349a07746e6f82 Mon Sep 17 00:00:00 2001 From: Dag Brattli Date: Fri, 12 Jun 2026 21:25:01 +0200 Subject: [PATCH 2/2] chore: rename `just test-python` to `just test` The native `dotnet run --project test/` path is a no-op (returns 0), so there is nothing else to test. Collapse the three-way test/test-native/ test-python split into a single `test` recipe that compiles the F# tests to Python and runs pytest. Update README and AGENTS docs accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) --- AGENTS.md | 2 +- README.md | 3 +-- justfile | 16 ++-------------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 1ca49ba..13aa66c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,7 +24,7 @@ do otherwise. Ignore those examples; follow this rule. ```bash just clean # Clean all build artifacts (build/, obj/, bin/, .fable/) just build # Build the project -just test-python # Run Python tests +just test # Run tests (compile F# to Python and run with pytest) just restore # Restore .NET and paket dependencies just example-flask # Build and run Flask example just example-fastapi # Build and run FastAPI example diff --git a/README.md b/README.md index 66327d8..6d5fcd7 100644 --- a/README.md +++ b/README.md @@ -170,8 +170,7 @@ just setup ```sh just # Show all available commands just build # Build F# to Python -just test # Run all tests (native .NET and Python) -just test-python # Run only Python tests +just test # Run tests (compile F# to Python and run with pytest) just format # Format code with Fantomas just pack # Create NuGet package just clean # Clean build artifacts diff --git a/justfile b/justfile index 5246b2a..30dce85 100644 --- a/justfile +++ b/justfile @@ -8,7 +8,7 @@ src_path := "src" test_path := "test" # Development mode: use local Fable repo instead of dotnet tool -# Usage: just dev=true test-python +# Usage: just dev=true test dev := "false" fable_repo := justfile_directory() / "../fable/python-ex-not-defined" fable := if dev == "true" { "dotnet run --project " + fable_repo / "src/Fable.Cli" + " --" } else { "dotnet fable" } @@ -40,20 +40,8 @@ build: clean run: clean dotnet build {{src_path}} -# Run all tests (native .NET and Python) +# Run tests (compile F# tests to Python and run with pytest) test: build - @echo "Running native .NET tests..." - dotnet run --project {{test_path}} - @echo "Compiling and running Python tests..." - {{fable}} {{test_path}} --lang Python --outDir {{build_path}}/tests - uv run pytest {{build_path}}/tests - -# Run only native .NET tests -test-native: - dotnet run --project {{test_path}} - -# Run only Python tests (requires build first) -test-python: build {{fable}} {{test_path}} --lang Python --outDir {{build_path}}/tests uv run pytest {{build_path}}/tests