python-testing-patterns
하는 일
이 가이드는 파이썬 코드를 포괄적으로 테스트하는 방법을 가르칩니다. 'pytest' 사용, '픽스처'(미리 정해진 준비 설정) 만들기, '목'(코드 일부를 흉내 내기), 테스트 주도 개발(TDD) 같은 기법을 다룹니다.
사용하는 경우
- ✓파이썬 코드에 대한 테스트를 작성할 때.
- ✓테스트 모음을 설정하고 정리할 때.
- ✓개발에 TDD 방식을 따를 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/python-testing-patterns/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“리스트의 평균을 계산하는 파이썬 함수는 어떻게 테스트를 작성하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 이 가이드를 바탕으로 효율적인 파이썬 테스트를 쓰는 방법을 보여 줍니다. pytest 같은 도구와, 의존하는 부분을 흉내 내는 기법을 설명해 코드가 올바르게 작동하는지 확인하게 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Python Testing Patterns
Comprehensive guide to implementing robust testing strategies in Python using pytest, fixtures, mocking, parameterization, and test-driven development practices.
Use this skill when
- Writing unit tests for Python code
- Setting up test suites and test infrastructure
- Implementing test-driven development (TDD)
- Creating integration tests for APIs and services
- Mocking external dependencies and services
- Testing async code and concurrent operations
- Setting up continuous testing in CI/CD
- Implementing property-based testing
- Testing database operations
- Debugging failing tests
Do not use this skill when
- The task is unrelated to python testing patterns
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open
resources/implementation-playbook.md.
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문
'pytest'란 무엇인가요?
파이썬 코드의 테스트를 더 쉽게 작성하도록 돕는 인기 있는 도구입니다.
'픽스처'란 무엇인가요?
여러 테스트에서 다시 쓸 수 있는 초기 설정으로, 테스트 환경을 준비해 줍니다.
'목(mocking)'이란 무엇인가요?
코드가 의존하는 부분이나 외부 서비스를 흉내 내는 기법입니다. 그렇게 하면 각 단위를 따로 떼어 테스트할 수 있습니다.
상세 정보
작성자의 원본 설명
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
인기도
- GitHub 스타
- 48k
- 순위
- #5553
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.