b.t.t.TestTestCase(tests.TestCase) : class documentation

Part of bzrlib.tests.test_selftest View In Hierarchy

Tests that test the core bzrlib TestCase.
Method test_assertLength_matches_empty Undocumented
Method test_assertLength_matches_nonempty Undocumented
Method test_assertLength_fails_different Undocumented
Method test_assertLength_shows_sequence_in_failure Undocumented
Method test_base_setUp_not_called_causes_failure Undocumented
Method test_base_tearDown_not_called_causes_failure Undocumented
Method test_debug_flags_sanitised The bzrlib debug flags should be sanitised by setUp.
Method change_selftest_debug_flags Undocumented
Method test_allow_debug_flag The -Eallow_debug flag prevents bzrlib.debug.debug_flags from being
Method test_disable_lock_checks The -Edisable_lock_checks flag disables thorough checks.
Method test_this_fails_strict_lock_check Undocumented
Method test_debug_flags_restored The bzrlib debug flags should be restored to their original state
Method make_test_result Get a test result that writes to the test log file.
Method inner_test Undocumented
Method outer_child Undocumented
Method test_trace_nesting Undocumented
Method method_that_times_a_bit_twice Undocumented
Method test_time_creates_benchmark_in_result Test that the TestCase.time() method accumulates a benchmark time.
Method test_hooks_sanitised The bzrlib hooks should be sanitised by setUp.
Method test__gather_lsprof_in_benchmarks When _gather_lsprof_in_benchmarks is on, accumulate profile data.
Method test_knownFailure Self.knownFailure() should raise a KnownFailure exception.
Method test_open_bzrdir_safe_roots Undocumented
Method test_requireFeature_available self.requireFeature(available) is a no-op.
Method test_requireFeature_unavailable self.requireFeature(unavailable) raises UnavailableFeature.
Method test_run_no_parameters Undocumented
Method test_run_enabled_unittest_result Test we revert to regular behaviour when the test is enabled.
Method test_run_disabled_unittest_result Test our compatability for disabled tests with unittest results.
Method test_run_disabled_supporting_result Test disabled tests behaviour with support aware results.
Method test_start_server_registers_url Undocumented
Method test_assert_list_raises_on_generator Undocumented
Method test_assert_list_raises_on_plain Undocumented
Method test_assert_list_raises_assert_wrong_exception Undocumented
Method test_assert_list_raises_no_exception Undocumented
Method test_overrideAttr_without_value Undocumented
Method test_overrideAttr_with_value Undocumented
Method test_recordCalls Undocumented

Inherited from TestCase:

Method __init__ Undocumented
Method setUp Undocumented
Method debug Undocumented
Method discardDetail Extend the addDetail, getDetails api so we can remove a detail.
Method install_counter_hook Install a counting hook.
Method disable_directory_isolation Turn off directory isolation checks.
Method enable_directory_isolation Enable directory isolation checks.
Method permit_dir Permit a directory to be used by this test. See permit_url.
Method permit_url Declare that url is an ok url to use in this test.
Method permit_source_tree_branch_repo Permit the source tree bzr is running from to be opened.
Method record_directory_isolation Gather accessed directories to permit later access.
Method start_server Start transport_server for this test.
Method assertEqual Undocumented
Method assertEqualDiff Assert two texts are equal, if not raise an exception.
Method assertEqualMode Undocumented
Method assertEqualStat assert that expected and actual are the same stat result.
Method assertLength Assert that obj_with_len is of length length.
Method assertLogsError Assert that func(*args, **kwargs) quietly logs a specific error.
Method assertPositive Assert that val is greater than 0.
Method assertNegative Assert that val is less than 0.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method assertContainsRe Assert that a contains something matching a regular expression.
Method assertNotContainsRe Assert that a does not match a regular expression
Method assertContainsString Undocumented
Method assertNotContainsString Undocumented
Method assertSubset Assert that every entry in sublist is present in superlist.
Method assertListRaises Fail unless excClass is raised when the iterator from func is used.
Method assertRaises Assert that a callable raises a particular exception.
Method assertIs Undocumented
Method assertIsNot Undocumented
Method assertTransportMode Fail if a path does not have mode "mode".
Method assertIsSameRealPath Fail if path1 and path2 points to different files
Method assertIsInstance Fail if obj is not an instance of kls
Method assertFileEqual Fail if path does not contain 'content'.
Method assertDocstring Fail if obj does not have expected_docstring
Method failUnlessExists Undocumented
Method assertPathExists Fail unless path or paths, which may be abs or relative, exist.
Method failIfExists Undocumented
Method assertPathDoesNotExist Fail if path or paths, which may be abs or relative, exist.
Method applyDeprecated Call a deprecated callable without warning the user.
Method callCatchWarnings Call a callable that raises python warnings.
Method callDeprecated Assert that a callable is deprecated in a particular way.
Method thisFailsStrictLockCheck It is known that this test would fail with -Dstrict_locks.
Method overrideAttr Overrides an object attribute restoring it after the test.
Method overrideEnv Set an environment variable, and reset it after the test.
Method recordCalls Monkeypatch in a wrapper that will record calls.
Method knownFailure Declare that this test fails for a known reason
Method time Run callable and accrue the time it takes to the benchmark time.
Method log Undocumented
Method get_log Get a unicode string containing the log from bzrlib.trace.
Method requireFeature This test requires a specific feature is available.
Method run_bzr Invoke bzr, as if it were run from the command line.
Method run_bzr_error Run bzr, and check that stderr contains the supplied regexes
Method run_bzr_subprocess Run bzr in a subprocess for testing.
Method start_bzr_subprocess Start bzr in a subprocess for testing.
Method get_source_path Return the path of the directory containing bzrlib.
Method get_bzr_path Return the path of the 'bzr' executable for this test suite.
Method finish_bzr_subprocess Finish the execution of process.
Method check_tree_shape Compare a tree to a list of expected names.
Method apply_redirected Call callable with redirected std io pipes.
Method reduceLockdirTimeout Reduce the default lock timeout for the duration of the test, so that
Method make_utf8_encoded_stringio Return a StringIOWrapper instance, that will encode Unicode
Method disable_verb Disable a smart server verb for one test.
Method _install_config_stats_hooks Install config hooks to count hook calls.
Method _clear_debug_flags Prevent externally set debug flags affecting tests.
Method _clear_hooks Undocumented
Method _silenceUI Turn off UI for duration of test
Method _check_locks Check that all lock take/release actions have been paired.
Method _track_locks Track lock activity during tests.
Method _lock_acquired Undocumented
Method _lock_released Undocumented
Method _lock_broken Undocumented
Method _preopen_isolate_transport Check that all transport openings are done in the test work area.
Method _preopen_isolate_url Undocumented
Method _track_transports Install checks for transport usage.
Method _ndiff_strings Return ndiff between two strings containing lines.
Method _capture_deprecation_warnings A helper for callDeprecated and applyDeprecated.
Method _startLogFile Setup a in-memory target for bzr and testcase log messages
Method _finishLogFile Flush and dereference the in-memory log for this testcase
Method _cleanEnvironment Undocumented
Method _restoreHooks Undocumented
Method _suppress_log Remove the log info from details.
Method _do_skip Undocumented
Static Method _do_known_failure Undocumented
Static Method _do_not_applicable Undocumented
Static Method _report_skip Override the default _report_skip.
Static Method _report_expected_failure Strip the log.
Static Method _do_unsupported_or_skip Undocumented
Method _run_bzr_autosplit Run bazaar command line, splitting up a string command line.
Method _run_bzr_core Undocumented
Method _add_subprocess_log Undocumented
Method _subprocess_log_cleanup Undocumented
Method _popen Place a call to Popen.
def test_assertLength_matches_empty(self):
Undocumented
def test_assertLength_matches_nonempty(self):
Undocumented
def test_assertLength_fails_different(self):
Undocumented
def test_assertLength_shows_sequence_in_failure(self):
Undocumented
def test_base_setUp_not_called_causes_failure(self):
Undocumented
def test_base_tearDown_not_called_causes_failure(self):
Undocumented
def test_debug_flags_sanitised(self):
The bzrlib debug flags should be sanitised by setUp.
def change_selftest_debug_flags(self, new_flags):
Undocumented
def test_allow_debug_flag(self):
The -Eallow_debug flag prevents bzrlib.debug.debug_flags from being sanitised (i.e. cleared) before running a test.
def test_disable_lock_checks(self):
The -Edisable_lock_checks flag disables thorough checks.
def test_this_fails_strict_lock_check(self):
Undocumented
def test_debug_flags_restored(self):
The bzrlib debug flags should be restored to their original state after the test was run, even if allow_debug is set.
def make_test_result(self):
Get a test result that writes to the test log file.
def inner_test(self):
Undocumented
def outer_child(self):
Undocumented
def test_trace_nesting(self):
Undocumented
def method_that_times_a_bit_twice(self):
Undocumented
def test_time_creates_benchmark_in_result(self):
Test that the TestCase.time() method accumulates a benchmark time.
def test_hooks_sanitised(self):
The bzrlib hooks should be sanitised by setUp.
def test__gather_lsprof_in_benchmarks(self):
When _gather_lsprof_in_benchmarks is on, accumulate profile data.

Each self.time() call is individually and separately profiled.

def test_knownFailure(self):
Self.knownFailure() should raise a KnownFailure exception.
def test_open_bzrdir_safe_roots(self):
Undocumented
def test_requireFeature_available(self):
self.requireFeature(available) is a no-op.
def test_requireFeature_unavailable(self):
self.requireFeature(unavailable) raises UnavailableFeature.
def test_run_no_parameters(self):
Undocumented
def test_run_enabled_unittest_result(self):
Test we revert to regular behaviour when the test is enabled.
def test_run_disabled_unittest_result(self):
Test our compatability for disabled tests with unittest results.
def test_run_disabled_supporting_result(self):
Test disabled tests behaviour with support aware results.
def test_start_server_registers_url(self):
Undocumented
def test_assert_list_raises_on_generator(self):
Undocumented
def test_assert_list_raises_on_plain(self):
Undocumented
def test_assert_list_raises_assert_wrong_exception(self):
Undocumented
def test_assert_list_raises_no_exception(self):
Undocumented
def test_overrideAttr_without_value(self):
Undocumented
def test_overrideAttr_with_value(self):
Undocumented
def test_recordCalls(self):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.