Fork me on GitHub

Changelog

0.5.1

Release date:2011-03-25

Bugs fixed:

  • The assert hook failed to evaluate list comprehensions and similar constructs because the loop variable was treated as a variable to be looked up in the symbol table.
  • Variables referencing objects implementing __name__ not returning a string caused an exception to exit early, if used with the assert hook in a failing condition.

0.5

Code name:Ghost Writer
Release date:2011-03-08
  • Support for evaluated testing with the assert statement by means of an import hook using the _ast module.
  • Assertions of all kinds now run with python -O.
  • Deprecated the Assert class in favor of the import hook.
  • Deprecated Loader in favor of a test_loader attribute on reporters.
  • Added the QuickFixReporter for testing from Vim and other editors.
  • Test functions now get as many context arguments as their signature asks for.
  • Organized the code into modules in a package, but everything can still be imported directly from the attest package.
  • Added runnable modules for running test suites by dotted name, python -mattest on Python 2.7 or newer, python -mattest.run on older versions.

0.4

Release date:2011-01-08
  • Support for Python 3.1 and PyPy (besides existing support for 2.5-2.7).
  • Reporters are now loaded via setuptools entry points, allowing third-party packages to register themselves automatically. The get_all_reporters() function was added to complement this extensibility.
  • TestResult was introduced and is now passed to reporters instead of the more limited set of arguments that were previously passed. This change is not backwards-compatible if you have custom reporters.
  • Conditional test registration: Tests.test_if(), Tests.register_if(), test_if().
  • Many new Assert methods:
    • isinstance() and not_isinstance()
    • issubclass() and not_issubclass()
    • json(), css() and xpath()
    • attr() and passed_to()
  • Import fallbacks can be tested using disable_imports().
  • The Tests constructor now accepts an iterable of contexts.
  • Passing Assert objects to the Assert constructor no-longer wraps multiple levels.
  • Test names now include the class name for class-based test.
  • Test registration via dotted name now handles unicode.

0.3

Release date:2010-11-27
  • None if yielded from a context is no-longer passed as arguments to tests.
  • Assert.is_() and Assert.is_not(), if passed an Assert instance, will unwrap it and test against the original object.

0.2

Release date:2010-11-26
  • Functional tests can now have multiple contexts.
  • Tests can be registered by dotted name (import path as string).
  • Collections have a command-line interface via Tests.main().

0.1

Release date:2010-11-25

Table Of Contents