github/copilot-cli-for-beginners · Archived

pytest-gen

Generate comprehensive pytest tests - use when generating tests, creating test suites, or testing Python code

First seen Apr 30, 2026

Installation

$ npx skills add github/copilot-cli-for-beginners --skill pytest-gen

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 github/copilot-cli-for-beginners.

npx skills add github/copilot-cli-for-beginners

Browse all from github/copilot-cli-for-beginners

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 2.8K
License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,354 B
  • docs SUMMARY.md 127 B

History

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

SKILL.md

Pytest Generation Skill

When generating tests, follow this structure.

Test Organization

  • Group tests by function under test
  • Use @pytest.mark.parametrize for multiple inputs
  • Use fixtures for shared setup
  • Follow arrange/act/assert pattern

Coverage Requirements

  • Happy path (expected usage)
  • Edge cases (empty strings, None, boundary values)
  • Error cases (invalid input, file not found, wrong types)
  • Integration (functions working together)

Template

import pytest
from module_under_test import function_to_test


@pytest.fixture
def sample_data():
    """Provide shared test data."""
    return {"key": "value"}


class TestFunctionName:
    """Tests for function_name."""

    def test_happy_path(self, sample_data):
        result = function_to_test(valid_input)
        assert result == expected_output

    def test_empty_input(self):
        result = function_to_test("")
        assert result == expected_for_empty

    @pytest.mark.parametrize("input_val,expected", [
        ("valid", True),
        ("", False),
        (None, False),
    ])
    def test_various_inputs(self, input_val, expected):
        assert function_to_test(input_val) == expected