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

Part of bzrlib.tests.test_smart_transport View In Hierarchy

No class docstring
Method setUp Undocumented
Method create_pipe_medium Create a new SmartServerPipeStreamMedium.
Method create_pipe_context Create a SmartServerSocketStreamMedium.
Method create_socket_medium Initialize a new medium.SmartServerSocketStreamMedium.
Method create_socket_context Create a new SmartServerSocketStreamMedium with default context.
Method test_smart_query_version Feed a canned query version to a server
Method test_response_to_canned_get Undocumented
Method test_response_to_canned_get_of_utf8 Undocumented
Method test_pipe_like_stream_with_bulk_data Undocumented
Method test_socket_stream_with_bulk_data Undocumented
Method test_pipe_like_stream_shutdown_detection Undocumented
Method test_socket_stream_shutdown_detection Undocumented
Method test_socket_stream_incomplete_request The medium should still construct the right protocol version even if
Method test_pipe_stream_incomplete_request The medium should still construct the right protocol version even if
Method test_pipe_like_stream_with_two_requests Undocumented
Method test_socket_stream_with_two_requests Undocumented
Method test_pipe_like_stream_error_handling Undocumented
Method test_socket_stream_error_handling Undocumented
Method test_pipe_like_stream_keyboard_interrupt_handling Undocumented
Method test_socket_stream_keyboard_interrupt_handling Undocumented
Method build_protocol_pipe_like Undocumented
Method build_protocol_socket Undocumented
Method assertProtocolOne Undocumented
Method assertProtocolTwo Undocumented
Method test_pipe_like_build_protocol_empty_bytes Undocumented
Method test_socket_like_build_protocol_empty_bytes Undocumented
Method test_pipe_like_build_protocol_non_two Undocumented
Method test_socket_build_protocol_non_two Undocumented
Method test_pipe_like_build_protocol_two Undocumented
Method test_socket_build_protocol_two Undocumented
Method test__build_protocol_returns_if_stopping Undocumented
Method test_socket_set_timeout Undocumented
Method test_pipe_set_timeout Undocumented
Method test_socket_wait_for_bytes_with_timeout_with_data Undocumented
Method test_socket_wait_for_bytes_with_timeout_no_data Undocumented
Method test_socket_wait_for_bytes_with_timeout_closed Undocumented
Method test_socket_wait_for_bytes_with_shutdown Undocumented
Method test_socket_serve_timeout_closes_socket Undocumented
Method test_pipe_wait_for_bytes_with_timeout_with_data Undocumented
Method test_pipe_wait_for_bytes_with_timeout_no_data Undocumented
Method test_pipe_wait_for_bytes_no_fileno Undocumented

Inherited from TestCase:

Method __init__ 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 setUp(self):
def create_pipe_medium(self, to_server, from_server, transport, timeout=4.0):
Create a new SmartServerPipeStreamMedium.
def create_pipe_context(self, to_server_bytes, transport):
Create a SmartServerSocketStreamMedium.

This differes from create_pipe_medium, in that we initialize the request that is sent to the server, and return the StringIO class that will hold the response.

def create_socket_medium(self, server_sock, transport, timeout=4.0):
Initialize a new medium.SmartServerSocketStreamMedium.
def create_socket_context(self, transport, timeout=4.0):
Create a new SmartServerSocketStreamMedium with default context.

This will call portable_socket_pair and pass the server side to create_socket_medium along with transport. It then returns the client_sock and the server.

def test_smart_query_version(self):
Feed a canned query version to a server
def test_response_to_canned_get(self):
def test_response_to_canned_get_of_utf8(self):
def test_pipe_like_stream_with_bulk_data(self):
def test_socket_stream_with_bulk_data(self):
def test_pipe_like_stream_shutdown_detection(self):
def test_socket_stream_shutdown_detection(self):
def test_socket_stream_incomplete_request(self):
The medium should still construct the right protocol version even if the initial read only reads part of the request.

Specifically, it should correctly read the protocol version line even if the partial read doesn't end in a newline. An older, naive implementation of _get_line in the server used to have a bug in that case.

def test_pipe_stream_incomplete_request(self):
The medium should still construct the right protocol version even if the initial read only reads part of the request.

Specifically, it should correctly read the protocol version line even if the partial read doesn't end in a newline. An older, naive implementation of _get_line in the server used to have a bug in that case.

def test_pipe_like_stream_with_two_requests(self):
def test_socket_stream_with_two_requests(self):
def test_pipe_like_stream_error_handling(self):
def test_socket_stream_error_handling(self):
def test_pipe_like_stream_keyboard_interrupt_handling(self):
def test_socket_stream_keyboard_interrupt_handling(self):
def build_protocol_pipe_like(self, bytes):
def build_protocol_socket(self, bytes):
def assertProtocolOne(self, server_protocol):
def assertProtocolTwo(self, server_protocol):
def test_pipe_like_build_protocol_empty_bytes(self):
def test_socket_like_build_protocol_empty_bytes(self):
def test_pipe_like_build_protocol_non_two(self):
def test_socket_build_protocol_non_two(self):
def test_pipe_like_build_protocol_two(self):
def test_socket_build_protocol_two(self):
def test__build_protocol_returns_if_stopping(self):
def test_socket_set_timeout(self):
def test_pipe_set_timeout(self):
def test_socket_wait_for_bytes_with_timeout_with_data(self):
def test_socket_wait_for_bytes_with_timeout_no_data(self):
def test_socket_wait_for_bytes_with_timeout_closed(self):
def test_socket_wait_for_bytes_with_shutdown(self):
def test_socket_serve_timeout_closes_socket(self):
def test_pipe_wait_for_bytes_with_timeout_with_data(self):
def test_pipe_wait_for_bytes_with_timeout_no_data(self):
def test_pipe_wait_for_bytes_no_fileno(self):
API Documentation for Bazaar, generated by pydoctor at 2021-09-17 00:22:38.