This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A LIB-rary of useful Python code

Project Description

Alib provides simple testing without boilerplate. For example, if myfile.py contains the line:

7 * 8 == 54  # I'm not sure about this!

then running:

$ python -m alib.test myfile.py

will, because the test fails, report the test line and the nature of the failure:

line 3:  7 * 8 == 54  # I'm not sure about this!
(['Eq'], [ReturnValue(56), ReturnValue(54)])

Exceptions are caught. The input line:

(1 + '2') == 3  # Can we add a string to a number?

produces:

line 4:  (1 + '2') == 3  # Can we add a string to a number?
(['Eq'], [ExceptionInstance(TypeError), ReturnValue(3)]

This test line succeeds (because the left hand side raises the right hand side).:

(1 + '2') ** TypeError  # We can't add a string to a number.

To test all Python files in the folder path/to/mydir run the command:

$ python -m alib.test path/to/mydir
Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
alib-0.0.1.tar.gz (6.8 kB) Copy SHA256 Checksum SHA256 Source Sep 14, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting