taucmdr.cf.storage.tests.test_levels module

Test functions.

Functions used for unit tests of levels.py.

class taucmdr.cf.storage.tests.test_levels.LevelsTest(methodName='runTest')[source]

Bases: TestCase

Tests for the storage levels with and without a system level.

_build_level_result(backend, user, system, install_in_user)[source]

Run _BUILD_LEVEL with a source archive in the user level, and optionally an installation there.

Returns:

The package UID and the parsed result.

Return type:

tuple

_classSetupFailed = False
_class_cleanups = []
static _dirs()[source]

Return a new user prefix and project directory under the test work dir.

_make_readonly(path)[source]

Remove write permission from path and everything under it until the test ends.

_python(code, backend, user, system=None, env=None)[source]
_tau(args, backend, cwd, user, system=None, *, expect_success=True)[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_build_level_error()[source]

Leaving build_level because of an exception restores the levels.

test_build_level_only()[source]

Inside build_level, packages are found, downloaded and installed only in the chosen level.

test_import_computes_no_level()[source]

Importing the experiment model doesn’t look for a writable storage level.

test_missing_system_prefix()[source]

A system prefix that doesn’t exist is an empty level that nothing writes to or creates.

test_no_system_level()[source]
test_readonly_system_level()[source]

A read-only system level is still read, and writing to it is an error, not a crash.

test_tau_source_default()[source]

Without a system level, TAU is downloaded by default.