=====
[](https://travis-ci.org/bfirsh/pspec)
Python testing for humans, built with [Attest](http://packages.python.org/Attest/).
Tests shouldn't just be for computers to check your code runs correctly. They can also be used by humans to understand what your code does.
pspec tests are designed to be parsed by humans. They look a bit like this:
```python
from pspec import describe, assert_raises
import random
with describe('random'):
with describe('shuffle'):
def it_does_not_lose_any_elements():
seq = range(10)
random.shuffle(seq)
seq.sort()
assert seq == range(10)
def it_raises_an_exception_for_an_immutable_sequence():
with assert_raises(TypeError):
random.shuffle((1, 2, 3))
with describe('choice'):
def it_picks_an_element_that_is_in_the_sequence():
seq = range(10)
assert random.choice(seq) in seq
```
(Compare with a [similar example for the built-in unittest module](http://docs.python.org/library/unittest.html#basic-example).)
They are run with the `pspec` command:
$ pspec random_spec
Development install
-------------------
$ pip install -r requirements.txt
$ python setup.py develop
Test suite
----------
$ pspec spec
Goals
-----
**Note:** pspec is still in its infancy. Don't expect it to be useful yet.
Here's some stuff I want it to do:
- Beautiful test reports with coloured string diffs. (Similar to [Mocha's](http://visionmedia.github.com/mocha/#string diffs))
- Contexts, before/after hooks, etc.
It's going to be simple, Pythonic and use minimal magic.
Metadata
Release files for pspec 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pspec-0.0.2.tar.gz | 5.2 kB | Without provenance | Details for pspec-0.0.2.tar.gz |
Release files / pspec-0.0.2.tar.gz
| Download URL | pspec-0.0.2.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69cd2cfdd465a88f1671938470865892fb6819e9b5263db7a7b68d554690f8a6
|
|
BLAKE2b-256 checksum How to use checksums |
2f7872170f164277726d533fcd76e699ff6c4254e023d3de4e6ae0d4e7f3a960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pspec 0.0.2
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.