Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
meleantonio avatar

Testing

  • 2 installs
  • 512 repo stars
  • Updated February 11, 2026
  • meleantonio/chernycode

Defines pytest testing conventions covering file organization, fixtures, parametrization, and an 80%+ coverage target.

About

Prescribes pytest standards for test layout, reusable fixtures via conftest, and parametrized cases with a coverage goal. A developer uses it when writing tests, creating fixtures, or running test suites.

  • Tests mirror src structure with 80%+ coverage target
  • Fixtures and @pytest.mark.parametrize conventions

Testing by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #1,683 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/meleantonio/chernycode --skill testing

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars512
Last updatedFebruary 11, 2026
Repositorymeleantonio/chernycode

What it does

Defines pytest testing conventions covering file organization, fixtures, parametrization, and an 80%+ coverage target.

Files

SKILL.mdMarkdownGitHub ↗

Testing Standards

Framework

  • Use pytest for all tests
  • Target 80%+ code coverage

File Organization

  • Tests in tests/ directory mirroring src/ structure
  • Test files: test_<module>.py or <module>_test.py
  • Test functions: test_<description>

Fixtures

  • Use fixtures for reusable test data
  • Prefer scope="function" unless shared state is needed
  • Use conftest.py for shared fixtures

Example:

import pytest

@pytest.fixture
def sample_user():
    """Create a sample user for testing."""
    return User(name="Test User", email="test@example.com")

def test_user_creation(sample_user):
    assert sample_user.name == "Test User"
    assert sample_user.email == "test@example.com"

Parametrization

  • Use @pytest.mark.parametrize for testing multiple inputs
  • Keep parameter names descriptive

Example:

@pytest.mark.parametrize("input_val,expected", [
    (1, 2),
    (2, 4),
    (0, 0),
])
def test_double(input_val, expected):
    assert double(input_val) == expected

Assertions

  • Use plain assert statements
  • Write clear assertion messages for complex checks
  • Test one concept per test function

Mocking

  • Use pytest-mock or unittest.mock
  • Mock external dependencies (APIs, databases)
  • Avoid mocking the code under test

Commands

  • Run tests: pytest
  • With coverage: pytest --cov
  • Verbose: pytest -v
  • Single file: pytest tests/test_specific.py
  • Single test: pytest tests/test_specific.py::test_name

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.