Skip to content

[Repo Assist] test: add Seq module coverage for 7 untested functions; fix pending Seq.tail test#244

Draft
github-actions[bot] wants to merge 2 commits intomasterfrom
repo-assist/test-seq-coverage-2026-03-12-3b7073999ed37882
Draft

[Repo Assist] test: add Seq module coverage for 7 untested functions; fix pending Seq.tail test#244
github-actions[bot] wants to merge 2 commits intomasterfrom
repo-assist/test-seq-coverage-2026-03-12-3b7073999ed37882

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Improves test coverage for the Seq module in SeqTests.fs:

  1. Fixes a broken pending testptest "I should not be able to get the tail of a empty sequence" was using |> ignore which never enumerates the lazy sequence, so the ArgumentException was never thrown and the test could never pass. Fixed by calling |> Seq.toList |> ignore to actually iterate the sequence. The test is now a regular test and passes.

  2. Adds 11 new tests covering previously-untested Seq functions:

Function Tests added
Seq.span splits at predicate, empty input, always-true predicate
Seq.groupNeighboursBy consecutive grouping, empty input, with projection
Seq.catOptions mixed Some/None, all None
Seq.choice1s extracts Choice1Of2
Seq.choice2s extracts Choice2Of2
Seq.partitionChoices splits both directions
Seq.equalsWith equal, different value, different length

Test Status

FSharpx.Collections.Tests: 721 passed, 5 skipped, 0 failed

The 5 skipped tests are all pre-existing ptest entries for bugs tracked in open PRs (#233, #238) — unchanged from before this PR.

Previously: 709 passed, 6 skipped (the Seq.tail ptest was one of those 6 and is now activated).

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f

…oices, groupNeighboursBy, equalsWith; fix ptest for Seq.tail

- Activate the long-pending ptest for Seq.tail on empty input: the test
  was broken because `Seq.tail []` returns a lazy seq and `|> ignore`
  never enumerates it. Fix by calling `|> Seq.toList |> ignore` so the
  ArgumentException is actually raised.
- Add 11 new deterministic tests covering previously-untested Seq functions:
  Seq.span, Seq.groupNeighboursBy, Seq.catOptions, Seq.choice1s, Seq.choice2s,
  Seq.partitionChoices, and Seq.equalsWith.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants