Skip to content

test(examples): add unit test suite for example solvers (#18) - #109

Open
harmehak0173 wants to merge 2 commits into
python-constraint:mainfrom
harmehak0173:test/add-missing-example-tests
Open

test(examples): add unit test suite for example solvers (#18)#109
harmehak0173 wants to merge 2 commits into
python-constraint:mainfrom
harmehak0173:test/add-missing-example-tests

Conversation

@harmehak0173

Copy link
Copy Markdown

Summary of Changes

Fixes #18.

This PR adds a dedicated unit test suite in tests/test_examples.py for the core example solvers:

  1. sudoku: Verifies 9x9 Sudoku solver execution, output formatting, and row validation.
  2. wordmath (sendmoremoney, twotwofour, seisseisdoze): Verifies cryptarithmetic solver correctness across all three problem variants.
  3. xsum: Verifies 5-number row sum constraint resolution.
  4. crosswords: Verifies crossword puzzle input preprocessing.

Testing

  • pytest --ignore=tests/test_compilation.py: 48 passed in 35.11s (83.41% total coverage achieved).

@coveralls

coveralls commented Aug 14, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 83.471% (+0.1%) from 83.344% — harmehak0173:test/add-missing-example-tests into python-constraint:main

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.

Missing tests for examples

2 participants