<commit_before># Testtube

[![Build Status](https://travis-ci.org/thomasw/testtube.png)](https://travis-ci.org/thomasw/testtube)
[![Coverage Status](https://coveralls.io/repos/thomasw/testtube/badge.png)](https://coveralls.io/r/thomasw/testtube)
[![Latest Version](https://pypip.in/v/testtube/badge.png)](https://pypi.python.org/pypi/testtube/)
[![Downloads](https://pypip.in/d/testtube/badge.png)](https://pypi.python.org/pypi/testtube/)

Spare your alt and tab keys by automatically running your project's test suite
whenever files change.

## Installation

Install testtube like you'd install any other python package:

```
pip install testtube
```

## Usage

### 1. Configure testtube

The simplest way to configure testtube is to drop a tube.py file in whatever
directory you'll be running the testtube watch command (`stir`) from.
The only thing that needs to be in that file is an iterable of tuples named
`PATTERNS` consisting of a regular expression and a list of tests to run.<commit_msg>Add compatibility note.<commit_after># Testtube

[![Build Status](https://travis-ci.org/thomasw/testtube.png)](https://travis-ci.org/thomasw/testtube)
[![Coverage Status](https://coveralls.io/repos/thomasw/testtube/badge.png)](https://coveralls.io/r/thomasw/testtube)
[![Latest Version](https://pypip.in/v/testtube/badge.png)](https://pypi.python.org/pypi/testtube/)
[![Downloads](https://pypip.in/d/testtube/badge.png)](https://pypi.python.org/pypi/testtube/)

Spare your alt and tab keys by automatically running your project's test suite
whenever files change.

## Installation

Install testtube like you'd install any other python package:

```
pip install testtube
```

testtube is tested with Python 2.6, 2.7, and 3.4 and pypy.

## Usage

### 1. Configure testtube

The simplest way to configure testtube is to drop a tube.py file in whatever
directory you'll be running the testtube watch command (`stir`) from.
The only thing that needs to be in that file is an iterable of tuples named
`PATTERNS` consisting of a regular expression and a list of tests to run.
{'fraction_non_alphanumeric': 0.13020329138431752, 'fraction_numerical': 0.003872216844143272, 'mean_word_length': 4.838983050847458, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1581097', 'n_tokens_mistral': 729, 'n_tokens_neox': 658, 'n_words': 202}