Skip to content

feat/test: roman numeral command and CLI tests (#91) - #132

Merged
codepiyusss merged 1 commit into
codepiyusss:mainfrom
KentSimon07:test-roman-cli
Nov 1, 2026
Merged

codepiyusss merged 1 commit into
codepiyusss:mainfrom
KentSimon07:test-roman-cli

Conversation

@KentSimon07

Copy link
Copy Markdown
Contributor

Background

I was the first to claim #91 (comment on the issue) and implemented the feature in #126 (fixit/roman.py, run_roman in cli.py, and 11 tests), opened on Oct 31 before roman support was added to main. #126 was closed due to merge conflicts after main gained its own roman implementation, so this follow-up brings in the test coverage that main is still missing.

What does this PR do?

  • 4 CLI tests in tests/test_cli.py for fixit roman:
    • number → numeral (1994 → MCMXCIV)
    • numeral → number (MCMXCIV → 1994)
    • out-of-range input (4000) returns exit code 1 with the range error
    • invalid numeral (IIII) returns exit code 1 with the "not a valid Roman numeral" error
  • Adds the empty string "" to the invalid-numeral cases in tests/test_roman.py

As requested in the review on #126:

  • Branched from the latest main, so there are no merge conflicts
  • pytest: 62 passed
  • ruff check and ruff format --check pass on the changed files

Related issue

Related to #91

Checklist

  • I commented on the issue first and was assigned
  • I removed the xfail marker (if fixing a bug) (N/A)
  • I added or updated tests
  • pytest passes locally
  • This PR only addresses one issue

@codepiyusss
codepiyusss merged commit 5c5c7c5 into codepiyusss:main Nov 1, 2026
1 check passed
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