b.t.p.t.TestControlDir(TestCaseWithControlDir) : class documentation

Part of bzrlib.tests.per_controldir.test_controldir View In Hierarchy

No class docstring
Method skipIfNoWorkingTree Raises TestSkipped if a_bzrdir doesn't have a working tree.
Method openWorkingTreeIfLocal If a_bzrdir is on a local transport, call open_workingtree() on it.
Method createWorkingTreeOrSkip Create a working tree on a_bzrdir, or raise TestSkipped.
Method sproutOrSkip Sprout from_bzrdir into to_url, or raise TestSkipped.
Method test_uninitializable Undocumented
Method test_create_null_workingtree Undocumented
Method test_destroy_workingtree Undocumented
Method test_destroy_branch Undocumented
Method test_destroy_repository Undocumented
Method test_open_workingtree_raises_no_working_tree ControlDir.open_workingtree() should raise NoWorkingTree (rather than
Method test_clone_bzrdir_repository_under_shared Undocumented
Method test_clone_bzrdir_repository_branch_both_under_shared Undocumented
Method test_clone_bzrdir_repository_branch_only_source_under_shared Undocumented
Method test_clone_bzrdir_repository_revision Undocumented
Method test_clone_bzrdir_branch_and_repo_fixed_user_id Undocumented
Method test_clone_bzrdir_branch_and_repo_into_shared_repo Undocumented
Method test_clone_bzrdir_branch_revision Undocumented
Method test_clone_on_transport_preserves_repo_format Undocumented
Method test_clone_bzrdir_tree_revision Undocumented
Method test_clone_bzrdir_into_notrees_repo Cloning into a no-trees repo should not create a working tree
Method test_clone_respects_stacked Undocumented
Method test_get_branch_reference_on_reference get_branch_reference should return the right url.
Method test_get_branch_reference_on_non_reference get_branch_reference should return None for non-reference branches.
Method test_get_branch_reference_no_branch get_branch_reference should not mask NotBranchErrors.
Method test_sprout_bzrdir_empty Undocumented
Method test_sprout_bzrdir_empty_under_shared_repo Undocumented
Method test_sprout_bzrdir_empty_under_shared_repo_force_new Undocumented
Method test_sprout_bzrdir_with_repository_to_shared Undocumented
Method test_sprout_bzrdir_repository_branch_both_under_shared Undocumented
Method test_sprout_bzrdir_repository_branch_only_source_under_shared Undocumented
Method test_sprout_bzrdir_repository_under_shared_force_new_repo Undocumented
Method test_sprout_bzrdir_repository_revision Undocumented
Method test_sprout_bzrdir_branch_and_repo_shared Undocumented
Method test_sprout_bzrdir_branch_and_repo_shared_force_new_repo Undocumented
Method test_sprout_bzrdir_branch_reference Undocumented
Method test_sprout_bzrdir_branch_reference_shared Undocumented
Method test_sprout_bzrdir_branch_reference_shared_force_new_repo Undocumented
Method test_sprout_bzrdir_branch_revision Undocumented
Method test_sprout_bzrdir_branch_with_tags Undocumented
Method test_sprout_bzrdir_branch_with_absent_tag Undocumented
Method test_sprout_bzrdir_passing_source_branch_with_absent_tag Undocumented
Method test_sprout_bzrdir_passing_rev_not_source_branch_copies_tags Undocumented
Method test_sprout_bzrdir_tree_branch_reference Undocumented
Method test_sprout_bzrdir_tree_branch_reference_revision Undocumented
Method test_sprout_bzrdir_tree_revision Undocumented
Method test_sprout_takes_accelerator Undocumented
Method test_sprout_branch_no_tree Undocumented
Method test_sprout_with_revision_id_uses_default_stack_on Undocumented
Method test_format_initialize_find_open Undocumented
Method test_format_initialize_on_transport_ex Undocumented
Method test_format_initialize_on_transport_ex_use_existing_dir_True Undocumented
Method test_format_initialize_on_transport_ex_use_existing_dir_False Undocumented
Method test_format_initialize_on_transport_ex_create_prefix_True Undocumented
Method test_format_initialize_on_transport_ex_create_prefix_False Undocumented
Method test_format_initialize_on_transport_ex_force_new_repo_True Undocumented
Method test_format_initialize_on_transport_ex_force_new_repo_False Undocumented
Method test_format_initialize_on_transport_ex_repo_fmt_name_None Undocumented
Method test_format_initialize_on_transport_ex_repo_fmt_name_followed Undocumented
Method assertInitializeEx Execute initialize_on_transport_ex and check it succeeded correctly.
Method test_format_network_name Undocumented
Method test_open_not_bzrdir Undocumented
Method test_create_branch Undocumented
Method test_create_branch_append_revisions_only Undocumented
Method test_open_branch Undocumented
Method test_list_branches Undocumented
Method test_create_repository Undocumented
Method test_create_repository_shared Undocumented
Method test_create_repository_nonshared Undocumented
Method test_open_repository Undocumented
Method test_create_workingtree Undocumented
Method test_create_workingtree_revision Undocumented
Method test_open_workingtree Undocumented
Method test_get_selected_branch Undocumented
Method test_get_selected_branch_none_selected Undocumented
Method test_root_transport Undocumented
Method test_find_repository_no_repo_under_standalone_branch Undocumented
Method test_find_repository_containing_shared_repository Undocumented
Method test_find_repository_standalone_with_containing_shared_repository Undocumented
Method test_find_repository_shared_within_shared_repository Undocumented
Method test_find_repository_with_nested_dirs_works Undocumented
Method test_can_and_needs_format_conversion Undocumented
Method test_backup_copies_existing Undocumented
Method test_upgrade_new_instance Does an available updater work?
Method test_format_description Undocumented

Inherited from TestCaseWithControlDir:

Method setUp Undocumented
Method get_bzrdir Undocumented
Method get_default_format Undocumented

Inherited from TestCaseWithTransport (via TestCaseWithControlDir):

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 disable_missing_extensions_warning Some tests expect a precise stderr content.

Inherited from TestCaseInTempDir (via TestCaseWithControlDir, 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 TestCaseWithControlDir, 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 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 TestCaseWithControlDir, 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 skipIfNoWorkingTree(self, a_bzrdir):
Raises TestSkipped if a_bzrdir doesn't have a working tree.

If the bzrdir does have a workingtree, this is a no-op.

def openWorkingTreeIfLocal(self, a_bzrdir):
If a_bzrdir is on a local transport, call open_workingtree() on it.
def createWorkingTreeOrSkip(self, a_bzrdir):
Create a working tree on a_bzrdir, or raise TestSkipped.

A simple wrapper for create_workingtree that translates NotLocalUrl into TestSkipped. Returns the newly created working tree.

def sproutOrSkip(self, from_bzrdir, to_url, revision_id=None, force_new_repo=False, accelerator_tree=None, create_tree_if_local=True):
Sprout from_bzrdir into to_url, or raise TestSkipped.

A simple wrapper for from_bzrdir.sprout that translates NotLocalUrl into TestSkipped. Returns the newly sprouted bzrdir.

def test_uninitializable(self):
Undocumented
def test_create_null_workingtree(self):
Undocumented
def test_destroy_workingtree(self):
Undocumented
def test_destroy_branch(self):
Undocumented
def test_destroy_repository(self):
Undocumented
def test_open_workingtree_raises_no_working_tree(self):
ControlDir.open_workingtree() should raise NoWorkingTree (rather than e.g. NotLocalUrl) if there is no working tree.
def test_clone_bzrdir_repository_under_shared(self):
Undocumented
def test_clone_bzrdir_repository_branch_both_under_shared(self):
Undocumented
def test_clone_bzrdir_repository_branch_only_source_under_shared(self):
Undocumented
def test_clone_bzrdir_repository_revision(self):
Undocumented
def test_clone_bzrdir_branch_and_repo_fixed_user_id(self):
Undocumented
def test_clone_bzrdir_branch_and_repo_into_shared_repo(self):
Undocumented
def test_clone_bzrdir_branch_revision(self):
Undocumented
def test_clone_on_transport_preserves_repo_format(self):
Undocumented
def test_clone_bzrdir_tree_revision(self):
Undocumented
def test_clone_bzrdir_into_notrees_repo(self):
Cloning into a no-trees repo should not create a working tree
def test_clone_respects_stacked(self):
Undocumented
def test_get_branch_reference_on_reference(self):
get_branch_reference should return the right url.
def test_get_branch_reference_on_non_reference(self):
get_branch_reference should return None for non-reference branches.
def test_get_branch_reference_no_branch(self):
get_branch_reference should not mask NotBranchErrors.
def test_sprout_bzrdir_empty(self):
Undocumented
def test_sprout_bzrdir_empty_under_shared_repo(self):
Undocumented
def test_sprout_bzrdir_empty_under_shared_repo_force_new(self):
Undocumented
def test_sprout_bzrdir_with_repository_to_shared(self):
Undocumented
def test_sprout_bzrdir_repository_branch_both_under_shared(self):
Undocumented
def test_sprout_bzrdir_repository_branch_only_source_under_shared(self):
Undocumented
def test_sprout_bzrdir_repository_under_shared_force_new_repo(self):
Undocumented
def test_sprout_bzrdir_repository_revision(self):
Undocumented
def test_sprout_bzrdir_branch_and_repo_shared(self):
Undocumented
def test_sprout_bzrdir_branch_and_repo_shared_force_new_repo(self):
Undocumented
def test_sprout_bzrdir_branch_reference(self):
Undocumented
def test_sprout_bzrdir_branch_reference_shared(self):
Undocumented
def test_sprout_bzrdir_branch_reference_shared_force_new_repo(self):
Undocumented
def test_sprout_bzrdir_branch_revision(self):
Undocumented
def test_sprout_bzrdir_branch_with_tags(self):
Undocumented
def test_sprout_bzrdir_branch_with_absent_tag(self):
Undocumented
def test_sprout_bzrdir_passing_source_branch_with_absent_tag(self):
Undocumented
def test_sprout_bzrdir_passing_rev_not_source_branch_copies_tags(self):
Undocumented
def test_sprout_bzrdir_tree_branch_reference(self):
Undocumented
def test_sprout_bzrdir_tree_branch_reference_revision(self):
Undocumented
def test_sprout_bzrdir_tree_revision(self):
Undocumented
def test_sprout_takes_accelerator(self):
Undocumented
def test_sprout_branch_no_tree(self):
Undocumented
def test_sprout_with_revision_id_uses_default_stack_on(self):
Undocumented
def test_format_initialize_find_open(self):
Undocumented
def test_format_initialize_on_transport_ex(self):
Undocumented
def test_format_initialize_on_transport_ex_use_existing_dir_True(self):
Undocumented
def test_format_initialize_on_transport_ex_use_existing_dir_False(self):
Undocumented
def test_format_initialize_on_transport_ex_create_prefix_True(self):
Undocumented
def test_format_initialize_on_transport_ex_create_prefix_False(self):
Undocumented
def test_format_initialize_on_transport_ex_force_new_repo_True(self):
Undocumented
def test_format_initialize_on_transport_ex_force_new_repo_False(self):
Undocumented
def test_format_initialize_on_transport_ex_repo_fmt_name_None(self):
Undocumented
def test_format_initialize_on_transport_ex_repo_fmt_name_followed(self):
Undocumented
def assertInitializeEx(self, t, **kwargs):
Execute initialize_on_transport_ex and check it succeeded correctly.

This involves checking that the disk objects were created, open with
the same format returned, and had the expected disk format.

:param t: The transport to initialize on.
:param **kwargs: Additional arguments to pass to
    initialize_on_transport_ex.
:return: the resulting repo, control dir tuple.
def test_format_network_name(self):
Undocumented
def test_open_not_bzrdir(self):
Undocumented
def test_create_branch(self):
Undocumented
def test_create_branch_append_revisions_only(self):
Undocumented
def test_open_branch(self):
Undocumented
def test_list_branches(self):
Undocumented
def test_create_repository(self):
Undocumented
def test_create_repository_shared(self):
Undocumented
def test_create_repository_nonshared(self):
Undocumented
def test_open_repository(self):
Undocumented
def test_create_workingtree(self):
Undocumented
def test_create_workingtree_revision(self):
Undocumented
def test_open_workingtree(self):
Undocumented
def test_get_selected_branch(self):
Undocumented
def test_get_selected_branch_none_selected(self):
Undocumented
def test_root_transport(self):
Undocumented
def test_find_repository_no_repo_under_standalone_branch(self):
Undocumented
def test_find_repository_containing_shared_repository(self):
Undocumented
def test_find_repository_standalone_with_containing_shared_repository(self):
Undocumented
def test_find_repository_shared_within_shared_repository(self):
Undocumented
def test_find_repository_with_nested_dirs_works(self):
Undocumented
def test_can_and_needs_format_conversion(self):
Undocumented
def test_backup_copies_existing(self):
Undocumented
def test_upgrade_new_instance(self):
Does an available updater work?
def test_format_description(self):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.