Skip to main content

An opinionated testing suite organizer for pytest

Project description

SuiteAs

License PyPI version Checked with mypy Linting: Ruff pre-commit.ci status codecov Downloads

An opinionated testing suite organizer and linter for pytest.

SuiteAs will automatically generate a skeletonized unit test suite based on the structure of your project. Then, going forward, it will enforce matching names and folder structure between your testing suite and your project using linter rules.

For now, only linting is supported; automatic test suite generation will be added later.

Sweet As

INFORMAL • NEW ZEALAND

very satisfactory; excellent.

The recommended way to use SuiteAs is using the pre-commit framework. Add the following to your .pre-commit-config.yaml file:

- repo: https://github.com/nathanjmcdougall/suiteas
    rev: v0.2.0
    hooks:
      - id: suiteas

You can also install and run SuiteAs as a standalone package:

pip install suiteas
python -m suiteas .

Rules

SuiteAs will enforce the following rules:

Rule Description
SUI001 Function or class is missing a corresponding test function
SUI002 Pytest test class is empty
SUI003 Pytest file does not import the function being tested

Developer Information

Package Management

This project uses rye to manage dependencies, virtual environments, and the python installation. Run rye sync from the project root to install the development environment.

Hooks with pre-commit

This project uses pre-commit to manage hooks. After installing the development environment, run pre-commit install.

Signed Commits

This project requires signed commits. Please see this guide from the VS Code project for instructions on how to configure this.

Diagramming

This project uses D2Lang to develop and maintain design diagrams.

Changelog

This project uses towncrier to manage the changelog. Each PR should have at least one associated GitHub issue. Before the PR is merged, a changelog entry should be created for any issues which are resolved by the PR. The changelog entry files are created in the doc/changelog_entries directory, with the filename following the convention <github id>.<type>.rst where <github id> is the GitHub issue ID number, and <type> is one of the types documented in the pyproject.toml file in the [tool.towncrier.type] sections.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

suiteas-0.3.0.tar.gz (32.0 kB view hashes)

Uploaded Source

Built Distribution

suiteas-0.3.0-py2.py3-none-any.whl (16.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page