Skip to main content
Overview
========

**NOTE**

Specit is **no longer actively developed**. It has been replaced by:

**compare**: for the pluggable `expect` syntax

- package: http://pypi.python.org/pypi/compare/
- source: https://github.com/rudylattae/compare/
- docs: http://packages.python.org/compare/

**checkit**: enables `nose` to detect and run test cases defined using BDD style "describe" and "it"

- package: http://pypi.python.org/pypi/checkit/
- source: https://bitbucket.org/rudylattae/checkit/


-----


Specit is a minimalistic tool to assist developers in creating
and validating executable specifications for python software. It
aims to:

1. Provide a readable, pythonic syntax for defining expectations in your example specifications.
2. Provide a simple tool for validating your specifications.

To this end, specit provides two components to simplify your
work with specs. The **expect** construct allows you to indicate
verifyable expectations of your software. It is a replacement for
the "self.assert..." syntax. The **specit** command uses
`Nose <http://somethingaboutorange.com/mrl/projects/nose>`_ to
validate your specifications.


Features
--------

- uses nose for discovering and running specs
- provides a base set of matchers for defining expectations
- easy to extend with custom matchers


Requirements
------------

All the requirements for using specit are auto-installed if you
use pip or easy_install. Here they are:

- `Nose <http://somethingaboutorange.com/mrl/projects/nose>`_


Installation
------------

The easiest way to install specit is with ``pip install spectit``
or with ``easy_install specit``. Alternatively, you may
`download <http://pypi.python.org/pypi/specit>`_ the
source package from PyPI, extract it and install it using
``python setup.py install``.


What you get
------------

When you install the package, you get two shiny components that
may help you achieve the goals above.

**"expect"**, is the grammar component. It provides a construct with
extensible matchers that enables you to describe the expected
behaviour of your software using a pythonic BDD manner. Again, this
helps you maintain your flow of thought without succumbing to
test-focused non-pythonic distrations like "self.assertEqual(s)...",
"self.assertTrue", etc.

**"specit"**, is the commandline component. It uses nose to discover
and execute specifications using flexible matching rules so that you
are not limited to using distracting unittest (test focused) constructs
like "def test..." or name your files "test...py".

Here is a trivial example of the clarity you gain when you
employ the "expect" construct in your specs::

> cat greeting.py
def greet():
return 'Hello you'

> cat greeting_specs.py
from specit import expect
from greeting import greet

expect(greet).to_return('Hello you')

Even more iteresting is the fact that you no longer have to
subject yourself to the unnecessary cruft needed for unittest
test cases. You can now create a spec like this::

> cat cool_specs.py
class DescribeCool(object):

def it_is_cool(self):
pass

Or even::

> cat awesome_specs.py
class MyAwesomeSpecs():

def should_always_smile(self):
pass

Finally, when you want to validate your software against the sepcs,
simply run the commandline tool "specit" in your project
directory like so::

> specit
..
----------------------------------------------------------------------
Ran 2 tests in 0.006s

OK


Feedback
--------

I welcome any questions or feedback about bugs and suggestions on how to
improve specit. Let me know what you think about specit. I am on twitter
`@RudyLattae <http://twitter.com/RudyLattae>`_ . I appreciate constructive
criticsms or high fives :)

Do you have suggestions for improvement? Then please create an
`issue <https://bitbucket.org/rudylattae/specit/issues>`_ with details
of what you would like to see. I'll take a look at it and work with you to either kill
the idea or implement it.


=========
Changelog
=========

0.1.2a (2010-12-08)
=====================

* First public release

====
TODO
====

- Core matchers:
- to_contain
- to_be_truthy
- to_be_falsy

- Provide better documentation and package information

- How to contribute / developer setup

- package url?

- distutils, setuptools or distribute?

Metadata

Release files for specit 0.2.1z

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

Source distribution (sdist)

Source distribution for specit 0.2.1z
File Size Uploaded Provenance Actions
specit-0.2.1z.zip 17.7 kB Without provenance Details for specit-0.2.1z.zip

Release files / specit-0.2.1z.zip

Download URL specit-0.2.1z.zip
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1f1edfeebf24f5d0845cbddc0db60d63050d74b7b69abf3bea5f61e322b1ab55
BLAKE2b-256 checksum
How to use checksums
940ff587d484d73ebb7c60512b158f0abd92fbe16f65f6e12a89c75cd85e30fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for specit 0.2.1z

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