You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: add tests for sys, html and time stdlib modules (#258)
* test: add tests for sys, html and time stdlib modules
Add test coverage for three stdlib modules that had bindings
but no tests:
- TestSys.fs: platform, version, maxsize, maxunicode, path, argv, byteorder
- TestHtml.fs: escape (with/without quote flag), unescape, roundtrip
- TestTime.fs: time, monotonic, perf_counter, process_time, ctime, sleep, timezone
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: address review feedback on sys/time tests
- Remove trivially-true Count >= 0 assertions; assert argv/path are non-empty instead
- Drop redundant |> ignore no-ops
- Remove sys.maxsize test — binding types it as int (Int32) but Python
value overflows on 64-bit systems, so comparison returns False
- Simplify time.sleep test to just call sleep (no-op assertion removed)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(sys): type maxsize as nativeint instead of int
Python's sys.maxsize is 2^63−1 on 64-bit systems, which overflows Fable's
Int32 (the target type for F# int). nativeint maps to Python's native int,
preserving the full value. Re-adds the maxsize positivity test.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Dag Brattli <dag@brattli.net>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments