ait.core.test package

Module contents

AIT Unit and Functional Tests

The ait.test module provides functional and unit tests for ait modules.

class ait.core.test.TestFile(data)

TestFile is a Python Context Manager for quickly creating test data files that delete when a test completes, either successfully or unsuccessfully.

Example:

with TestFile(data) as filename:
# filename (likely something like ‘/var/tmp/tmp.1.uNqbVJ’) now # contains data. assert load(filename)

Whether the above assert passes or throws AssertionError, filename will be deleted.

__init__(data)

Creates a new TestFile and writes data to a temporary file.

ait.core.test.setUp()

Set up tests.

Turn logging level to CRITICAL: due to failure test cases, there are many verbose log messages that are useful in context.

ait.core.test.tearDown()

Tear down tests.

Turn logging level back to INFO.