meleantonio/chernycode · Archived

testing

Testing conventions using pytest. Use when writing tests, creating fixtures, or running test suites.

First seen Apr 26, 2026

Installation

$ npx skills add meleantonio/chernycode --skill testing

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from meleantonio/chernycode.

npx skills add meleantonio/chernycode

Browse all from meleantonio/chernycode

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 516
License MIT
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,630 B
  • docs SUMMARY.md 115 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

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="[email protected]")

def test_user_creation(sample_user):
    assert sample_user.name == "Test User"
    assert sample_user.email == "[email protected]"

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/testspecific.py::testname