def unit(session, py):
    """Run the unit test suite."""

    # Run unit tests against all supported versions of Python.
    session.interpreter = 'python{}'.format(py)

    # Install all test dependencies.
    session.install('-r', 'requirements-test.txt')

    # Install dev packages.
    _install_dev_packages(session)

    # Run py.test against the unit tests.
    session.run(
        'py.test',
        '--quiet',
        '--cov=opencensus',
        '--cov=context',
        '--cov=contrib',
        '--cov-append',
        '--cov-config=.coveragerc',
        '--cov-report=',
        '--cov-fail-under=97',
        'tests/unit/',
        'context/',
        'contrib/',
        *session.posargs
    )
def unit ( session , py ) : session . interpreter = 'python{}' . format ( py ) session . install ( '-r' , 'requirements-test.txt' ) _install_dev_packages ( session ) session . run ( 'py.test' , '--quiet' , '--cov=opencensus' , '--cov=context' , '--cov=contrib' , '--cov-append' , '--cov-config=.coveragerc' , '--cov-report=' , '--cov-fail-under=97' , 'tests/unit/' , 'context/' , 'contrib/' , * session . posargs )
Run the unit test suite.