b.t.p.TestVersionedFiles(TestCaseWithMemoryTransport) : class documentation

Part of bzrlib.tests.per_versionedfile View In Hierarchy

Tests for the multiple-file variant of VersionedFile.
Method get_versionedfiles Undocumented
Method get_simple_key Return a key for the object under test.
Method test_add_fallback_implies_without_fallbacks Undocumented
Method test_add_lines Undocumented
Method test__add_text Undocumented
Method test_annotate Undocumented
Method test_check_no_parameters Undocumented
Method test_check_progressbar_parameter A progress bar can be supplied because check can be a generator.
Method test_check_with_keys_becomes_generator Undocumented
Method test_clear_cache Undocumented
Method test_construct Each parameterised test can be constructed on a transport.
Method get_diamond_files Undocumented
Method test_add_lines_nostoresha Undocumented
Method test__add_text_nostoresha Undocumented
Method test_add_lines_return Undocumented
Method test_add_lines_no_key_generates_chk_key Undocumented
Method test_empty_lines Empty files can be stored.
Method test_newline_only Undocumented
Method test_get_known_graph_ancestry Undocumented
Method test_known_graph_with_fallbacks Undocumented
Method test_get_record_stream_empty An empty stream can be requested without error.
Method assertValidStorageKind Assert that storage_kind is a valid storage_kind.
Method capture_stream Capture a stream for testing.
Method test_get_record_stream_interface each item in a stream has to provide a regular interface.
Method get_keys_and_sort_order Get diamond test keys list, and their sort ordering.
Method get_keys_and_groupcompress_sort_order Get diamond test keys list, and their groupcompress sort ordering.
Method test_get_record_stream_interface_ordered each item in a stream has to provide a regular interface.
Method test_get_record_stream_interface_ordered_with_delta_closure each item must be accessible as a fulltext.
Method test_get_record_stream_interface_groupcompress each item in a stream has to provide a regular interface.
Method assertStreamOrder Undocumented
Method test_get_record_stream_unknown_storage_kind_raises Asking for a storage kind that the stream cannot supply raises.
Method test_get_record_stream_missing_records_are_absent Undocumented
Method assertRecordHasContent Assert that record has the bytes bytes.
Method test_get_record_stream_native_formats_are_wire_ready_one_ft Undocumented
Method assertStreamMetaEqual Assert that streams expected and stream have the same records.
Method stream_to_bytes_or_skip_counter Convert a stream to a bytes iterator.
Method test_get_record_stream_native_formats_are_wire_ready_ft_delta Undocumented
Method test_get_record_stream_native_formats_are_wire_ready_delta Undocumented
Method test_get_record_stream_wire_ready_delta_closure_included Undocumented
Method assertAbsentRecord Helper for test_get_record_stream_missing_records_are_absent.
Method test_filter_absent_records Requested missing records can be filter trivially.
Method get_mapper Get a mapper suitable for the key length of the test interface.
Method get_parents Get parents, taking self.graph into consideration.
Method test_get_annotator Undocumented
Method test_get_parent_map Undocumented
Method test_get_sha1s Undocumented
Method test_insert_record_stream_empty Inserting an empty record stream should work.
Method assertIdenticalVersionedFile Assert that left and right have the same contents.
Method test_insert_record_stream_fulltexts Any file should accept a stream of fulltexts.
Method test_insert_record_stream_fulltexts_noeol Any file should accept a stream of fulltexts.
Method test_insert_record_stream_annotated_knits Any file should accept a stream from plain knits.
Method test_insert_record_stream_annotated_knits_noeol Any file should accept a stream from plain knits.
Method test_insert_record_stream_plain_knits Any file should accept a stream from plain knits.
Method test_insert_record_stream_plain_knits_noeol Any file should accept a stream from plain knits.
Method test_insert_record_stream_existing_keys Inserting keys already in a file should not error.
Method test_insert_record_stream_missing_keys Inserting a stream with absent keys should raise an error.
Method test_insert_record_stream_out_of_order An out of order stream can either error or work.
Method test_insert_record_stream_long_parent_chain_out_of_order An out of order stream can either error or work.
Method get_knit_delta_source Get a source that can produce a stream with knit delta records,
Method test_insert_record_stream_delta_missing_basis_no_corruption Insertion where a needed basis is not included notifies the caller
Method test_insert_record_stream_delta_missing_basis_can_be_added_later Insertion where a needed basis is not included notifies the caller
Method test_iter_lines_added_or_present_in_keys Undocumented
Method test_make_mpdiffs Undocumented
Method test_keys Undocumented
Method _add_content_nostoresha When nostore_sha is supplied using old content raises.

Inherited from TestCaseWithMemoryTransport:

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_vfs_only_server Get the vfs only read/write server instance.
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 makeAndChdirToTestDir Create a temporary directories for this one test.
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 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 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_versionedfiles(self, relpath='files'):
Undocumented
def get_simple_key(self, suffix):
Return a key for the object under test.
def test_add_fallback_implies_without_fallbacks(self):
Undocumented
def test_add_lines(self):
Undocumented
def test__add_text(self):
Undocumented
def test_annotate(self):
Undocumented
def test_check_no_parameters(self):
Undocumented
def test_check_progressbar_parameter(self):
A progress bar can be supplied because check can be a generator.
def test_check_with_keys_becomes_generator(self):
Undocumented
def test_clear_cache(self):
Undocumented
def test_construct(self):
Each parameterised test can be constructed on a transport.
def get_diamond_files(self, files, trailing_eol=True, left_only=False, nokeys=False):
Undocumented
def _add_content_nostoresha(self, add_lines):
When nostore_sha is supplied using old content raises.
def test_add_lines_nostoresha(self):
Undocumented
def test__add_text_nostoresha(self):
Undocumented
def test_add_lines_return(self):
Undocumented
def test_add_lines_no_key_generates_chk_key(self):
Undocumented
def test_empty_lines(self):
Empty files can be stored.
def test_newline_only(self):
Undocumented
def test_get_known_graph_ancestry(self):
Undocumented
def test_known_graph_with_fallbacks(self):
Undocumented
def test_get_record_stream_empty(self):
An empty stream can be requested without error.
def assertValidStorageKind(self, storage_kind):
Assert that storage_kind is a valid storage_kind.
def capture_stream(self, f, entries, on_seen, parents, require_fulltext=False):
Capture a stream for testing.
def test_get_record_stream_interface(self):
each item in a stream has to provide a regular interface.
def get_keys_and_sort_order(self):
Get diamond test keys list, and their sort ordering.
def get_keys_and_groupcompress_sort_order(self):
Get diamond test keys list, and their groupcompress sort ordering.
def test_get_record_stream_interface_ordered(self):
each item in a stream has to provide a regular interface.
def test_get_record_stream_interface_ordered_with_delta_closure(self):
each item must be accessible as a fulltext.
def test_get_record_stream_interface_groupcompress(self):
each item in a stream has to provide a regular interface.
def assertStreamOrder(self, sort_order, seen, keys):
Undocumented
def test_get_record_stream_unknown_storage_kind_raises(self):
Asking for a storage kind that the stream cannot supply raises.
def test_get_record_stream_missing_records_are_absent(self):
Undocumented
def assertRecordHasContent(self, record, bytes):
Assert that record has the bytes bytes.
def test_get_record_stream_native_formats_are_wire_ready_one_ft(self):
Undocumented
def assertStreamMetaEqual(self, records, expected, stream):
Assert that streams expected and stream have the same records.
ParametersrecordsA list to collect the seen records.
ReturnsA generator of the records in stream.
def stream_to_bytes_or_skip_counter(self, skipped_records, full_texts, stream):
Convert a stream to a bytes iterator.
Parametersskipped_recordsA list with one element to increment when a record is skipped.
full_textsA dict from key->fulltext representation, for checking chunked or fulltext stored records.
streamA record_stream.
ReturnsAn iterator over the bytes of each record.
def test_get_record_stream_native_formats_are_wire_ready_ft_delta(self):
Undocumented
def test_get_record_stream_native_formats_are_wire_ready_delta(self):
Undocumented
def test_get_record_stream_wire_ready_delta_closure_included(self):
Undocumented
def assertAbsentRecord(self, files, keys, parents, entries):
Helper for test_get_record_stream_missing_records_are_absent.
def test_filter_absent_records(self):
Requested missing records can be filter trivially.
def get_mapper(self):
Get a mapper suitable for the key length of the test interface.
def get_parents(self, parents):
Get parents, taking self.graph into consideration.
def test_get_annotator(self):
Undocumented
def test_get_parent_map(self):
Undocumented
def test_get_sha1s(self):
Undocumented
def test_insert_record_stream_empty(self):
Inserting an empty record stream should work.
def assertIdenticalVersionedFile(self, expected, actual):
Assert that left and right have the same contents.
def test_insert_record_stream_fulltexts(self):
Any file should accept a stream of fulltexts.
def test_insert_record_stream_fulltexts_noeol(self):
Any file should accept a stream of fulltexts.
def test_insert_record_stream_annotated_knits(self):
Any file should accept a stream from plain knits.
def test_insert_record_stream_annotated_knits_noeol(self):
Any file should accept a stream from plain knits.
def test_insert_record_stream_plain_knits(self):
Any file should accept a stream from plain knits.
def test_insert_record_stream_plain_knits_noeol(self):
Any file should accept a stream from plain knits.
def test_insert_record_stream_existing_keys(self):
Inserting keys already in a file should not error.
def test_insert_record_stream_missing_keys(self):
Inserting a stream with absent keys should raise an error.
def test_insert_record_stream_out_of_order(self):
An out of order stream can either error or work.
def test_insert_record_stream_long_parent_chain_out_of_order(self):
An out of order stream can either error or work.
def get_knit_delta_source(self):
Get a source that can produce a stream with knit delta records, regardless of this test's scenario.
def test_insert_record_stream_delta_missing_basis_no_corruption(self):
Insertion where a needed basis is not included notifies the caller of the missing basis. In the meantime a record missing its basis is not added.
def test_insert_record_stream_delta_missing_basis_can_be_added_later(self):
Insertion where a needed basis is not included notifies the caller of the missing basis. That basis can be added in a second insert_record_stream call that does not need to repeat records present in the previous stream. The record(s) that required that basis are fully inserted once their basis is no longer missing.
def test_iter_lines_added_or_present_in_keys(self):
Undocumented
def test_make_mpdiffs(self):
Undocumented
def test_keys(self):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2019-07-22 00:30:44.