Add pytest tests for the Python solutions

Open Beginner friendly
#118 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
testing

Research direction

Choose 3 to 5 Python solution files and add a tests/ file for each, using pytest. Start by reading the selected solutions to identify their inputs and expected behavior, then cover normal and relevant edge cases. Done means the selected files have passing tests; fix any bugs you find in the same PR and describe those changes.

Written by the indexing model from the issue text.

Description

1-hour algorithm all-levels codewars hackerrank hacktoberfest help wanted interview-prep leetcode medium open-source python students testing

Most Python solutions have no tests. Pick a few and write proper pytest cases for them.

Time: about an hour for a handful of files
Skills: Python, basic pytest

What to do
  • Choose 3 to 5 solution files
  • Create a tests/ folder with a test file per solution
  • Cover normal input, edge cases (empty, single item, negatives, duplicates), and large input where it makes sense
  • If a solution has a bug, fix it in the same PR and say what you changed

Do not worry about covering everything. A few well-tested files is a good start.


Who can take this

Anyone. Beginners, experienced developers, students, and people who do not code. Any language, any level. If you want to help, you are welcome here.

How to contribute

  1. Comment on this issue so nobody else starts the same thing
  2. Fork the repo
  3. Clone your fork and create a branch
  4. Make your change
  5. Commit, push, and open a Pull Request

Never opened a pull request before? Start with First Contributions or watch this walkthrough.

Stuck on anything? Ask in the comments. Basic questions are fine.

If this repo helps you or you like where it is going, a star is a nice way to say thanks and helps other people find it. Entirely optional, and you do not need it to contribute.

Dominant language
Python
Stars
3
Forks
2
Avg merge
4h 40m
Merged PRs (30d)
11

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Huerte/algo-solutions-python

All issues in Huerte/algo-solutions-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.