Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Testing tools for data preparation.

Project Description

Datatest extends the Python standard library’s unittest package to provide testing tools for asserting data correctness.

Datatest can help prepare messy data that needs to be cleaned, integrated, formatted, and verified. It can provide structure for the tidying process, automate checklists, log discrepancies, and measure progress.


The easiest way to install datatest is to use pip:

pip install datatest

Stuntman Mike

If you need bug-fixes or features that are not available in the current official release, you can “pip install” the unstable development version directly from GitHub:

pip install --upgrade

All of the usual caveats of a bleeding-edge install should apply here. Only use an unstable development version if you can risk some instability or if you know exactly what you’re doing. While care is taken to never break the build, it can happen.

Safety-first Clyde

If you need to review and test packages before installing, you can install datatest manually:

Download the latest version from

Unpack the file and review the source code (replacing X.Y.Z with the appropriate version number):

tar xvfz datatest-X.Y.Z.tar.gz

Change to the unpacked directory and run the tests:

cd datatest-X.Y.Z
python test

Please Note: Tests for optional data sources (like pandas DataFrames or MS Excel files) are skipped if the related third-party packages are not installed.

If everything looks good, install the package:

python install

Supported Versions

Tested on Python versions 3.5, 3.4, 3.3, 3.2, 3.1, 2.7 and 2.6. Datatest is pure Python and is likely to run on PyPy, Jython, and other implementations without issues (check with “ test” before installing).

Future Plans

We’re aiming to release a 1.0.0, stable API by the end of the year. But before this happens, we want to get community feedback, add support for more data sources, and improve py.test integration (including a py.test plugin).

This said, all of the data used at the National Committee for an Effective Congress has been checked with test suites built on datatest for more than a year. The API may adjust in small ways but drastic changes are not anticipated.


There are no hard dependencies. But if you want to interface with pandas DataFrames, MS Excel workbooks, or other optional data sources, you will need to install the relevant third-party packages (pandas, xlrd, etc.).

Freely licensed under the Apache License, Version 2.0

Copyright 2014 - 2016 NCEC Services, LLC and contributing authors

Release History

This version
History Node


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