Skip to main content
grappa logo

Build Status PyPI Coverage Status Documentation Status Stability Code Climate Python Versions

About

grappa is a behavior-oriented, self-declarative, expressive and developer-friendly lightweight assertion library for Python.

grappa comes with two declarative assertion styles: expect and should.

It also comes with a detailed, human-friendly error reporting system that aims to reduce friction and improve human agility while testing and fixing software.

To get started, take a look to the documentation and tutorial.

Status

grappa is currently beta quality software and under active development and improvements.

API is not stable yet and still prone to introduce breaking changes.

Why grappa?

grappa aims to assist humans while doing a very recurrent and not very fun task in software development: testing things.

The core idea behind grappa comes from the fact that human time is considerably more expensive than machine time, and therefore any machine assistance to optimize processes and close the gap is beneficial.

With grappa you can express almost in plain English what the test contract actually is, but in a way that’s fun and easy to write but also more easy and pleasant to read or maintain by other developers.

The Zen of grappa

  • Frictionless testing: introducing self-declarative behavior testing patterns can make testing more fun for test writers and more enjoyable for test readers.

  • Expressivity is paramount: humans should easily understand what the code is doing.

  • Human time is expensive: any modern software should assist people to identify and understand errors easily.

  • Make error reporting great again: feedback during testing is key, let’s make it more handy and less frustrating.

  • Testing patterns consolidation: software expectations are limited to the boundaries of language data types and structures.

  • Do not hurt feelings: seeing errors is not a nice thing, but it can be painless if details are showed you in a more gentle way.

Features

  • Behavior-oriented expressive Pythonic fluent API.

  • Provides both expect and should assertion styles.

  • Full-featured built-in assertions.

  • Human-friendly and frustration-less error reporting.

  • Composable assertions chaining.

  • Extensible assertions based on third-party plugins.

  • Testing framework agnostic. Works with unittest, nosetests, pytest …

  • Lightweight and (almost) dependency-free.

  • Works with Python 2.6+, 3+ and PyPy.

Installation

Using pip package manager:

pip install --upgrade grappa

Or install the latest sources from Github:

pip install -e git+git://github.com/grappa-python/grappa.git#egg=grappa

History

0.1.0 (2017-03-05)

  • First version (beta)

Metadata

Release files for grappa 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grappa 0.1.0
File Size Uploaded Provenance Actions
grappa-0.1.0.tar.gz 29.0 kB Without provenance Details for grappa-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for grappa 0.1.0
File Interpreter ABI Platform Actions
grappa-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for grappa-0.1.0-py2.py3-none-any.whl

Total release size: 79.6 kB

Release files / grappa-0.1.0.tar.gz

Download URL grappa-0.1.0.tar.gz
Size 29.0 kB
Tags Source
SHA-256 checksum
How to use checksums
39df3b24ffb31de27ba31075c906629e7cb5d552142a819df075214be3647154
BLAKE2b-256 checksum
How to use checksums
f65890549d95360973ca1a14a475495c6d0782ab56d8e3f63847f2fa3aec2194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / grappa-0.1.0-py2.py3-none-any.whl

Download URL grappa-0.1.0-py2.py3-none-any.whl
Size 50.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4f9f829323a46fdd2108940d18762deecb83a8eb3eaacbed48bac48fec1be8d4
BLAKE2b-256 checksum
How to use checksums
7aa1bcbf6dccef21892112ae14790cba431b4ebe6f578301e388a84612223736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for grappa 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page