Skip to content
Back to skills

Python Testing Advanced

ASecurity

Use when implementing advanced Python testing.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 10, 2026
ai-agentspythontestingapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill python-testing-advanced --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Testing Advanced?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Testing Advanced
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-python-testing-advanced/badge)](https://www.skillsdirectory.com/skills/loopyluci-python-testing-advanced)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: python-testing-advanced
description: "Use when implementing advanced Python testing."
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
  hermes:
    tags: [python, testing, pytest, fixtures, mocking, parametrize]
    related_skills: [testing-pyramid-practice, property-based-testing, behavior-driven-development]
---

# Advanced Python Testing

Implementing advanced Python testing — from pytest fixtures and conftest through mocking, parametrization, and test infrastructure.

## When to Use

- Building robust test suites with pytest
- Implementing reusable fixtures and conftest
- Mocking external dependencies
- Parametric and property-based testing

## Testing Patterns

```python
import pytest
from unittest.mock import Mock, patch

@pytest.fixture
def db_session():
    session = create_test_session()
    yield session
    session.close()

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

class TestUserAPI:
    @patch('app.api.get_user')
    def test_get_user(self, mock_get):
        mock_get.return_value = {'id': 1, 'name': 'Test'}
        response = client.get('/users/1')
        assert response.status_code == 200
```

## Verification Checklist

- [ ] Fixture scope (function, class, module, session) chosen appropriately
- [ ] conftest.py for shared fixtures
- [ ] Mock objects for external dependencies
- [ ] Parametrize for data-driven tests
- [ ] Monkeypatch for environment modifications
- [ ] Test coverage > 80%

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.