b.t.p.TestPackRepository(TestCaseWithTransport) : class documentation

Part of bzrlib.tests.per_pack_repository View In Hierarchy

Tests to be repeated across all pack-based formats.

The following are populated from the test scenario:

Instance Variablesformat_nameRegistered name fo the format to test.
format_stringOn-disk format marker.
Method get_format Undocumented
Method test_attribute__fetch_order Packs do not need ordered data retrieval.
Method test_attribute__fetch_uses_deltas Packs reuse deltas.
Method test_disk_layout Undocumented
Method check_format Undocumented
Method assertHasNoKndx Assert that knit_name has no index on t.
Method assertHasNoKnit Assert that knit_name exists on t.
Method check_databases check knit content for a repository.
Method test_shared_disk_layout Undocumented
Method test_shared_no_tree_disk_layout Undocumented
Method test_adding_revision_creates_pack_indices Undocumented
Method test_pulling_nothing_leads_to_no_new_names Undocumented
Method test_commit_across_pack_shape_boundary_autopacks Undocumented
Method test_commit_write_group_returns_new_pack_names Undocumented
Method test_fail_obsolete_deletion Undocumented
Method test_pack_collection_sets_sibling_indices The CombinedGraphIndex objects in the pack collection are all
Method test_pack_after_two_commits_packs_everything Undocumented
Method test_pack_preserves_all_inventories Undocumented
Method test_pack_layout Undocumented
Method test_pack_repositories_support_multiple_write_locks Undocumented
Method test_concurrent_writers_merge_new_packs Undocumented
Method test_concurrent_writer_second_preserves_dropping_a_pack Undocumented
Method test_concurrent_pack_triggers_reload Undocumented
Method test_concurrent_pack_during_get_record_reloads Undocumented
Method test_concurrent_pack_during_autopack Undocumented
Method test_lock_write_does_not_physically_lock Undocumented
Method prepare_for_break_lock Undocumented
Method test_break_lock_breaks_physical_lock Undocumented
Method test_broken_physical_locks_error_on__unlock_names_lock Undocumented
Method test_fetch_without_find_ghosts_ignores_ghosts Undocumented
Method make_write_ready_repo Undocumented
Method test_missing_inventories_compression_parent_prevents_commit Undocumented
Method test_missing_revisions_compression_parent_prevents_commit Undocumented
Method test_missing_signatures_compression_parent_prevents_commit Undocumented
Method test_missing_text_compression_parent_prevents_commit Undocumented
Method test_supports_external_lookups Undocumented
Method test_abort_write_group_does_not_raise_when_suppressed Similar to per_repository.test_write_group's test of the same name.
Method test_abort_write_group_does_raise_when_not_suppressed Undocumented
Method test_suspend_write_group Undocumented
Method test_resume_chk_bytes Undocumented
Method test_resume_write_group_then_abort Undocumented
Method test_commit_resumed_write_group Undocumented
Method test_resume_malformed_token Undocumented
Method _add_text Add a text to the repository within a write group.
Method _lock_write Lock write_lockable, add a cleanup and return the result.

Inherited from TestCaseWithTransport:

Method get_vfs_only_server See TestCaseWithMemoryTransport.
Method make_branch_and_tree Create a branch on the transport and a tree locally.
Method assertIsDirectory Assert that relpath within transport is a directory.
Method assertTreesEqual Check that left and right have the same content and properties.
Method setUp Undocumented
Method disable_missing_extensions_warning Some tests expect a precise stderr content.

Inherited from TestCaseInTempDir (via TestCaseWithTransport):

Method check_file_contents Undocumented
Method makeAndChdirToTestDir See TestCaseWithMemoryTransport.makeAndChdirToTestDir().
Method deleteTestDir Undocumented
Method build_tree Build a test tree according to a pattern.
Method assertInWorkingTree Assert whether path or paths are in the WorkingTree
Method assertNotInWorkingTree Assert whether path or paths are not in the WorkingTree
Method _getTestDirPrefix Undocumented

Inherited from TestCaseWithMemoryTransport (via TestCaseWithTransport, TestCaseInTempDir):

Method __init__ Undocumented
Method get_transport Return a writeable transport.
Method get_readonly_transport Return a readonly transport for the test scratch space
Method create_transport_readonly_server Create a transport server from class defined at init.
Method get_readonly_server Get the server instance for the readonly transport
Method get_readonly_url Get a URL for the readonly transport.
Method get_server Get the read/write server instance.
Method get_url Get a URL (or maybe a path) for the readwrite transport.
Method get_vfs_only_url Get a URL (or maybe a path for the plain old vfs transport.
Method make_branch Create a branch on the transport at relpath.
Method get_default_format Undocumented
Method resolve_format Resolve an object to a ControlDir format object.
Method make_bzrdir Undocumented
Method make_repository Create a repository on our default transport at relpath.
Method make_smart_server Undocumented
Method make_branch_and_memory_tree Create a branch on the default transport and a MemoryTree for it.
Method make_branch_builder Undocumented
Method overrideEnvironmentForTesting Undocumented
Method setup_smart_server_with_call_log Sets up a smart server as the transport server with a call log.
Method reset_smart_call_log Undocumented
Method _adjust_url Get a URL (or maybe a path) for the readwrite transport.
Method _create_safety_net Make a fake bzr directory.
Method _check_safety_net Check that the safety .bzr directory have not been touched.
Method _make_test_root Undocumented

Inherited from TestCase (via TestCaseWithTransport, TestCaseInTempDir, TestCaseWithMemoryTransport):

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 get_format(self):
def test_attribute__fetch_order(self):
Packs do not need ordered data retrieval.
def test_attribute__fetch_uses_deltas(self):
Packs reuse deltas.
def test_disk_layout(self):
def check_format(self, t):
def assertHasNoKndx(self, t, knit_name):
Assert that knit_name has no index on t.
def assertHasNoKnit(self, t, knit_name):
Assert that knit_name exists on t.
def check_databases(self, t):
check knit content for a repository.
def test_shared_disk_layout(self):
def test_shared_no_tree_disk_layout(self):
def test_adding_revision_creates_pack_indices(self):
def test_pulling_nothing_leads_to_no_new_names(self):
def test_commit_across_pack_shape_boundary_autopacks(self):
def test_commit_write_group_returns_new_pack_names(self):
def test_fail_obsolete_deletion(self):
def test_pack_collection_sets_sibling_indices(self):
The CombinedGraphIndex objects in the pack collection are all siblings of each other, so that search-order reorderings will be copied to each other.
def test_pack_after_two_commits_packs_everything(self):
def test_pack_preserves_all_inventories(self):
def test_pack_layout(self):
def test_pack_repositories_support_multiple_write_locks(self):
def _add_text(self, repo, fileid):
Add a text to the repository within a write group.
def test_concurrent_writers_merge_new_packs(self):
def test_concurrent_writer_second_preserves_dropping_a_pack(self):
def test_concurrent_pack_triggers_reload(self):
def test_concurrent_pack_during_get_record_reloads(self):
def test_concurrent_pack_during_autopack(self):
def test_lock_write_does_not_physically_lock(self):
def prepare_for_break_lock(self):
def test_break_lock_breaks_physical_lock(self):
def test_broken_physical_locks_error_on__unlock_names_lock(self):
def test_fetch_without_find_ghosts_ignores_ghosts(self):
def make_write_ready_repo(self):
def test_missing_inventories_compression_parent_prevents_commit(self):
def test_missing_revisions_compression_parent_prevents_commit(self):
def test_missing_signatures_compression_parent_prevents_commit(self):
def test_missing_text_compression_parent_prevents_commit(self):
def test_supports_external_lookups(self):
def _lock_write(self, write_lockable):
Lock write_lockable, add a cleanup and return the result.
Parameterswrite_lockableAn object with a lock_write method.
ReturnsThe result of write_lockable.lock_write().
def test_abort_write_group_does_not_raise_when_suppressed(self):
Similar to per_repository.test_write_group's test of the same name.

Also requires that the exception is logged.

def test_abort_write_group_does_raise_when_not_suppressed(self):
def test_suspend_write_group(self):
def test_resume_chk_bytes(self):
def test_resume_write_group_then_abort(self):
def test_commit_resumed_write_group(self):
def test_resume_malformed_token(self):
API Documentation for Bazaar, generated by pydoctor at 2021-09-27 00:20:28.