Skip to content

Conversation

@dbrattli
Copy link
Collaborator

Summary

  • Add Fable.Python.Testing module with cross-platform test utilities that work on both .NET (XUnit) and Python (pytest)
  • Provides equal, notEqual, throwsError, throwsErrorContaining, throwsAnyError, doesntThrow assertions
  • Uses Fable.Core.Testing.Assert (the standard Fable way)
  • Remove local test/Util.fs - all test files now use open Fable.Python.Testing directly
  • Add sanity tests for the Testing module itself to ensure assertions actually fail when they should

Test plan

  • All 241 tests pass (224 existing + 17 new for Testing module)
  • Sanity tests verify assertions fail correctly (not just always passing)

Release-As: 5.0.0-alpha.21.4

🤖 Generated with Claude Code

Add a Testing module that provides test utilities for writing tests that
run on both .NET (with XUnit) and Python (with pytest).

Features:
- `equal` / `notEqual` - Assert equality/inequality (F# style: expected first)
- `throwsError` - Assert exact error message
- `throwsErrorContaining` - Assert error contains substring
- `throwsAnyError` - Assert any error is thrown
- `doesntThrow` - Assert no error is thrown
- `FactAttribute` - Mark test functions for pytest discovery

Uses `Fable.Core.Testing.Assert` (the standard Fable way) instead of
custom Emit statements.

Also removes the local test/Util.fs and updates all test files to use
the new Fable.Python.Testing module directly.

Release-As: 5.0.0-alpha.21.4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@dbrattli dbrattli merged commit 2356705 into main Dec 21, 2025
2 checks passed
@dbrattli dbrattli deleted the feat/testing-module branch December 21, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants