Skip to content

test: Add pytest suite for FLAMES game core logic#1244

Merged
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Kinara2020:test/add-flames-game-tests
Jun 19, 2026
Merged

test: Add pytest suite for FLAMES game core logic#1244
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Kinara2020:test/add-flames-game-tests

Conversation

@Kinara2020

@Kinara2020 Kinara2020 commented Jun 18, 2026

Copy link
Copy Markdown

📝 Description

The FLAMES game had no corresponding test file in the tests/ directory. This PR adds a comprehensive pytest suite covering core game logic including common character removal, FLAMES result calculation, score computation, and the degenerate case where both names share all letters.

9 tests added covering:

  • remove_common_chars() — basic and identical name cases
  • calculate_flames() — count variations (1, 3, 6)
  • calculate_score() — range validation and full match
  • Degenerate case detection
  • Known input/output validation

🔗 Linked Issue

Closes #1243

📋 Contribution Checklist

  • My code strictly adheres to the project guidelines (Standard library only, procedural code, clean spacing).
  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • I have included interactive emojis and clean console/UI outputs.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above.
image

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@kinara2086 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Kinara2020 Kinara2020 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@Kinara2020

Kinara2020 commented Jun 18, 2026

Copy link
Copy Markdown
Author

Hello @steam-bell-92
The CI failure in modal.spec.js:4:3 is a pre-existing flaky Playwright test unrelated to this PR. It tests
Modal Lifecycle & Focus Trapping which is not affected by the pytest suite added here. 15 Playwright tests passed, and all 9 new pytest tests pass locally.

@Kinara2020

Kinara2020 commented Jun 18, 2026

Copy link
Copy Markdown
Author

Hello @steam-bell-92
Would like to get feedback and review upon and would request to add appropriate gssoc labels.

@steam-bell-92 steam-bell-92 merged commit 4fd9742 into steam-bell-92:main Jun 19, 2026
10 of 12 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

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.

💡 [Feature] Test: Add pytest test suite for FLAMES game logic

3 participants