Skip to content

Commit 3a35e44

Browse files
dbrattliclaude
andcommitted
fix: remove XUnit dependency from Testing module
The XUnit conditional package reference was preventing dotnet pack from creating the NuGet package. Since Testing module is designed for Fable/Python (using Fable.Core.Testing.Assert), it doesn't need XUnit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 669fe18 commit 3a35e44

2 files changed

Lines changed: 2 additions & 20 deletions

File tree

src/Fable.Python.fsproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@
4040
<Compile Include="fable/Types.fs" />
4141
<Compile Include="fable/Testing.fs" />
4242
</ItemGroup>
43-
<ItemGroup Condition="'$(FABLE_COMPILER)' != 'true'">
44-
<PackageReference Include="xunit" Version="2.9.*" />
45-
</ItemGroup>
4643
<ItemGroup>
4744
<Content Include="pyproject.toml; *.fsproj; **\*.fs; **\*.fsi" PackagePath="fable\" />
4845
</ItemGroup>

src/fable/Testing.fs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Cross-platform test utilities for writing tests that run on both .NET (with XUnit) and Python (with pytest).
1+
/// Test utilities for Fable Python projects using pytest.
22
///
33
/// Example usage:
44
/// ```fsharp
@@ -16,8 +16,6 @@
1616
module Fable.Python.Testing
1717
1818
open System
19-
20-
#if FABLE_COMPILER
2119
open Fable.Core.Testing
2220
2321
/// Assert equality (expected first, then actual - F# style)
@@ -30,20 +28,7 @@ let notEqual expected actual : unit = Assert.NotEqual(actual, expected)
3028
type FactAttribute() =
3129
inherit System.Attribute()
3230
33-
#else
34-
open Xunit
35-
36-
/// Assert equality (expected first, then actual - F# style)
37-
let equal<'T> (expected: 'T) (actual: 'T) : unit = Assert.Equal(expected, actual)
38-
39-
/// Assert inequality
40-
let notEqual<'T> (expected: 'T) (actual: 'T) : unit = Assert.NotEqual(expected, actual)
41-
42-
/// FactAttribute is already provided by XUnit
43-
type FactAttribute = Xunit.FactAttribute
44-
#endif
45-
46-
// Exception testing helpers (work on both platforms)
31+
// Exception testing helpers
4732
4833
let private run (f: unit -> 'a) =
4934
try

0 commit comments

Comments
 (0)