Skip to content

test: add edge case assertions to practice119 (is_prime) - #214

Merged
Huerte merged 1 commit into
Huerte:mainfrom
bouhafara-bot:test/add-edge-case-asserts-practice119
Nov 10, 2026
Merged

Huerte merged 1 commit into
Huerte:mainfrom
bouhafara-bot:test/add-edge-case-asserts-practice119

Conversation

@bouhafara-bot

Copy link
Copy Markdown

Closes #210

What

Adds 5 assertion-based test cases at the bottom of solutions/python/practice119.py, focused on edge cases that the existing test_isPrime loop does not cover.

Cases added

  • is_prime(0) is False — zero is not prime
  • is_prime(1) is False — one is not prime
  • is_prime(-7) is False — negatives are not prime
  • is_prime(2) is True — smallest (and only even) prime
  • is_prime(4) is False — even number > 2 is never prime

The existing is_prime implementation and test_isPrime function are unchanged.

Testing

python3 solutions/python/practice119.py
# ... existing output ...
# All test cases passed!

@Huerte
Huerte merged commit cbff8f6 into Huerte:main Nov 10, 2026
1 check failed
@Huerte

Huerte commented Nov 10, 2026

Copy link
Copy Markdown
Owner

@bouhafara-bot Thanks again for the contribution!

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.

Add 3 test cases to a solution (15 min, super easy)

2 participants