taucmdr.tests.test_run_tests module

Unit tests for the test runner itself.

class taucmdr.tests.test_run_tests.RunTestsTest(methodName='runTest')[source]

Bases: TestCase

Tests for scripts/run_tests.py.

_classSetupFailed = False
_class_cleanups = []
static _make_modules(files)[source]

Write files into a new directory and return the directory.

_probe_system_prefix(setenv=None, cwd=None)[source]

Run a probe test under the runner and return what it saw.

Returns:

taucmdr.SYSTEM_PREFIX, the values of TAUCMDR_SYSTEM_PREFIX and __TAUCMDR_SYSTEM_PREFIX__ in the probe’s environment, and whether the prefix directory exists.

Return type:

tuple

_run(*args, pythonpath=(), unset=(), setenv=None, cwd=None)[source]
test_deprecation_warnings()[source]

Deprecation warnings from TAU Commander’s own modules fail the run; other deprecation warnings don’t.

test_import_error_traceback()[source]

A package that raises an exception when imported shows a traceback, not a “no tests” error.

test_list_unloadable_name()[source]

Listing a name that can’t be loaded is an error.

test_name_without_tests()[source]

Listing a package that holds no tests is an error.

test_namespace_package()[source]

Listing a namespace package gives a “no tests” error.

test_nested_run_results_dir()[source]

A nested test run writes its results elsewhere than this run’s results directory.

test_no_implicit_tempdir_cleanup()[source]

Every temporary directory is cleaned up explicitly, so none warns at exit.

test_package_name()[source]

Listing tests by package name lists the tests in every test module under it.

test_prints_tested_package()[source]

The runner says which copy of taucmdr it is testing.

test_repo_dir()[source]

The runner tells the tests where the checkout is.

test_results_dir_replaced()[source]

The runner clears old results from the results directory and writes new ones there.

test_sandbox_cleanup_failure()[source]

The runner warns about a sandbox directory it can’t delete.

test_script_name()[source]

The runner makes help messages use the name tau.

test_system_prefix_absolute()[source]

The runner exports a relative system prefix as an absolute path, under both names.

test_system_prefix_created()[source]

The runner creates a system prefix that doesn’t exist yet, so the tests have a system level.

test_system_prefix_default()[source]

Without a system prefix variable, the runner puts system storage in the checkout.

test_system_prefix_public_name()[source]

The runner takes the system prefix from TAUCMDR_SYSTEM_PREFIX.