SpecLoud
Use nosetests and plugins to take BDD specifications easier.
Installation
The easiest way to install specloud is using pip and requirements file:
$ pip install specloud
Usage
Get a python file with BDD-style test names (starting with it, ensure, should, must, spec, example, deve) and add them to the test suite
For example:
$ cat example.py
import unittest
class CalculatorSpec(unittest.TestCase):
def it_should_sum_integers(self):
# ...
pass
def should_not_divide_by_zero(self):
# ...
pass
def must_accept_floats(self):
# ...
pass
def ensure_it_work_with_fractions(self):
# ...
pass
def test_subtract_positive_from_negative_numbers(self):
# ...
pass
def deve_calcular_raizes_quadradas(self):
# ...
pass
The command line tool specloud colorizes green for tests with no failures and no errors and red for tests with failures and/or errors:
$ specloud example.py Calculator spec - ensure it work with fractions - it should sum integers - must accept floats - should not divide by zero - subtract positive from negative numbers - deve calcular raizes quadradas ---------------------------------------------------------------------- Ran 6 tests in 0.003s OK
How It Works
SpecLoud is a python package that install nose, pinocchio and figleaf packages, so it can call nosetests with pinocchio and figleaf plugins. nosetests is called with some default options to find test methods and pinocchio to show pretty and colored messages. figleaf is just pinocchio dependency.
A call to:
$ specloud FILE
is the same doing:
$ nosetests -i '^(it|ensure|must|should|specs?|examples?|deve)' -i '(specs?(.py)?|examples?(.py)?)$' '--with-spec' '--spec-color'
Old Name
The project was born as a proof of concept and I named it firstly pyunitbdd. But that’s a terrible name. So I renamed the project to specloud.
Metadata
Release files for specloud 0.4.5
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 | |
|---|---|---|---|---|
| specloud-0.4.5.tar.gz | 3.5 kB | Without provenance | Details |
Release files / specloud-0.4.5.tar.gz
| Download URL | specloud-0.4.5.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4705f2fd0d89f07d66cc721c0a17e302e1d67205e0d4b1880044d38bc3fdbb8
|
|
BLAKE2b-256 checksum How to use checksums |
138ea9f416e219493c0600ebad6188b00318ade9bc1fcc6e9557851f7b7073d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for specloud 0.4.5
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.