b.t.TestCase(testtools.TestCase) : class documentation

Part of bzrlib.tests View In Hierarchy

Known subclasses: bzrlib.plugins.bash_completion.tests.test_bashcomp.TestBashCodeGen, bzrlib.plugins.bash_completion.tests.test_bashcomp.TestBashCompletion, bzrlib.plugins.bash_completion.tests.test_bashcomp.TestDataCollector, bzrlib.plugins.changelog_merge.tests.test_changelog_merge.TestMergeCoreLogic, bzrlib.plugins.launchpad.test_lp_api.TestCacheDirectory, bzrlib.plugins.launchpad.test_lp_api.TestDependencyManagement, bzrlib.plugins.launchpad.test_lp_api_lite.Test_ReportFreshness, bzrlib.plugins.launchpad.test_lp_api_lite.TestIsUpToDate, bzrlib.plugins.launchpad.test_lp_api_lite.TestLatestPublication, bzrlib.plugins.launchpad.test_lp_directory.TestXMLRPCTransport, bzrlib.plugins.launchpad.test_lp_service.LaunchpadServiceTests, bzrlib.plugins.launchpad.test_lp_service.TestURLInference, bzrlib.plugins.weave_fmt.test_repository.TestSerializer, bzrlib.tests.blackbox.test_command_encoding.TestCommandEncoding, bzrlib.tests.blackbox.test_exceptions.TestOptParseBugHandling, bzrlib.tests.blackbox.test_selftest.TestOptions, bzrlib.tests.blackbox.test_version.TestVersion, bzrlib.tests.doc_generate.builders.test_texinfo.TestBuilderDefined, bzrlib.tests.per_branch.test_branch.TestDecorators, bzrlib.tests.per_foreign_vcs.test_repository.TestRepositoryFormat, bzrlib.tests.per_uifactory.TestCannedInputUIFactory, bzrlib.tests.per_uifactory.TestSilentUIFactory, bzrlib.tests.per_uifactory.TestTextUIFactory, bzrlib.tests.per_versionedfile.VirtualVersionedFilesTests, bzrlib.tests.per_workingtree.TestWtScenarios, bzrlib.tests.test__bencode.TestBencodeDecode, bzrlib.tests.test__bencode.TestBencodeEncode, bzrlib.tests.test__btree_serializer.TestBtreeSerializer, bzrlib.tests.test__chk_map.Test_BytesToTextKey, bzrlib.tests.test__chk_map.TestDeserialiseInternalNode, bzrlib.tests.test__chk_map.TestDeserialiseLeafNode, bzrlib.tests.test__chk_map.TestSearchKeys, bzrlib.tests.test__chunks_to_lines.TestChunksToLines, bzrlib.tests.test__dirstate_helpers.TestBisectDirblock, bzrlib.tests.test__dirstate_helpers.TestBisectPathLeft, bzrlib.tests.test__dirstate_helpers.TestBisectPathRight, bzrlib.tests.test__dirstate_helpers.TestCmpByDirs, bzrlib.tests.test__dirstate_helpers.TestCmpPathByDirblock, bzrlib.tests.test__dirstate_helpers.TestMemRChr, bzrlib.tests.test__dirstate_helpers.TestPackStat, bzrlib.tests.test__dirstate_helpers.TestUsingCompiledIfAvailable, bzrlib.tests.test__groupcompress.TestBase128Int, bzrlib.tests.test__groupcompress.TestCopyInstruction, bzrlib.tests.test__groupcompress.TestDeltaIndex, bzrlib.tests.test__groupcompress.TestMakeAndApplyCompatible, bzrlib.tests.test__groupcompress.TestMakeAndApplyDelta, bzrlib.tests.test__known_graph.TestCaseWithKnownGraph, bzrlib.tests.test__rio.TestReadUnicodeStanza, bzrlib.tests.test__rio.TestReadUTF8Stanza, bzrlib.tests.test__rio.TestValidTag, bzrlib.tests.test__simple_set.TestSimpleSet, bzrlib.tests.test__static_tuple.TestEnsureStaticTuple, bzrlib.tests.test__static_tuple.TestStaticTuple, bzrlib.tests.test_annotate.TestReannotate, bzrlib.tests.test_api.APITests, bzrlib.tests.test_api.TestAPIVersioning, bzrlib.tests.test_bisect_multi.TestBisectMultiBytes, bzrlib.tests.test_branch.TestBranchFormatRegistry, bzrlib.tests.test_branch.TestDefaultFormat, bzrlib.tests.test_branch.TestMetaDirBranchFormatFactory, bzrlib.tests.test_branch.TestPullResult, bzrlib.tests.test_btree_index.TestCompiledBtree, bzrlib.tests.test_btree_index.TestExpandOffsets, bzrlib.tests.test_btree_index.TestMultiBisectRight, bzrlib.tests.test_bugtracker.TestPropertyEncoding, bzrlib.tests.test_bundle.BTreeTester, bzrlib.tests.test_bundle.TestBundleWriterReader, bzrlib.tests.test_bzrdir.TestDefaultFormat, bzrlib.tests.test_bzrdir.TestFormatRegistry, bzrlib.tests.test_cache_utf8.TestEncodeCache, bzrlib.tests.test_cethread.TestCatchingExceptionThread, bzrlib.tests.test_chk_map.TestNode, bzrlib.tests.test_chk_serializer.TestBEncodeSerializer1, bzrlib.tests.test_cleanup.CleanupsTestCase, bzrlib.tests.test_cleanup.TestObjectWithCleanups, bzrlib.tests.test_cmdline.TestSplitter, bzrlib.tests.test_commands.TestCommands, bzrlib.tests.test_commands.TestExtendCommandHook, bzrlib.tests.test_commands.TestGetAlias, bzrlib.tests.test_commands.TestGetCommandHook, bzrlib.tests.test_commands.TestGetMissingCommandHook, bzrlib.tests.test_commands.TestInvokedAs, bzrlib.tests.test_commands.TestListCommandHook, bzrlib.tests.test_commands.TestRegisterLazy, bzrlib.tests.test_commands.TestSeeAlso, bzrlib.tests.test_config.TestAuthenticationConfig, bzrlib.tests.test_config.TestAuthenticationConfigFile, bzrlib.tests.test_config.TestAutoUserId, bzrlib.tests.test_config.TestCommandLineSection, bzrlib.tests.test_config.TestConfig, bzrlib.tests.test_config.TestConfigObj, bzrlib.tests.test_config.TestConfigObjErrors, bzrlib.tests.test_config.TestConfigPath, bzrlib.tests.test_config.TestCredentialStoreRegistry, bzrlib.tests.test_config.TestGetConfig, bzrlib.tests.test_config.TestIniConfigOptionExpansion, bzrlib.tests.test_config.TestLocationSection, bzrlib.tests.test_config.TestMailAddressExtraction, bzrlib.tests.test_config.TestMutableSection, bzrlib.tests.test_config.TestOption, bzrlib.tests.test_config.TestOptionRegistry, bzrlib.tests.test_config.TestOptionWithBooleanConverter, bzrlib.tests.test_config.TestOptionWithBooleanConverter 0, bzrlib.tests.test_config.TestOptionWithIntegerConverter, bzrlib.tests.test_config.TestOptionWithIntegerConverter 0, bzrlib.tests.test_config.TestOptionWithListConverter, bzrlib.tests.test_config.TestOptionWithListConverter 0, bzrlib.tests.test_config.TestPlainTextCredentialStore, bzrlib.tests.test_config.TestRegisteredOptions, bzrlib.tests.test_config.TestSection, bzrlib.tests.test_config.TestStackGet 0, bzrlib.tests.test_conflicts.TestConflictList, bzrlib.tests.test_conflicts.TestPerConflict, bzrlib.tests.test_conflicts.TestResolveActionOption, bzrlib.tests.test_controldir.DefaultControlComponentFormatTests, bzrlib.tests.test_controldir.TestMetaComponentFormatRegistry, bzrlib.tests.test_counted_lock.TestCountedLock, bzrlib.tests.test_counted_lock.TestDummyLock, bzrlib.tests.test_crash.TestNonApportReporting, bzrlib.tests.test_decorators.TestDecoratorActions, bzrlib.tests.test_decorators.TestDecoratorDocs, bzrlib.tests.test_decorators.TestOnlyRaisesDecorator, bzrlib.tests.test_decorators.TestPrettyDecorators, bzrlib.tests.test_delta.TestReportChanges, bzrlib.tests.test_diff.TestDiff, bzrlib.tests.test_diff.TestPatienceDiffLib, bzrlib.tests.test_diff.TestUsingCompiledIfAvailable, bzrlib.tests.test_directory_service.TestDirectoryLookup, bzrlib.tests.test_dirstate.Test_InvEntryToDetails, bzrlib.tests.test_dirstate.TestUpdateBasisByDelta, bzrlib.tests.test_email_message.TestEmailMessage, bzrlib.tests.test_eol_filters.TestEolFilters, bzrlib.tests.test_eol_filters.TestEolRulesSpecifications, bzrlib.tests.test_errors.TestErrorFormatting, bzrlib.tests.test_estimate_compressed_size.TestZLibEstimator, bzrlib.tests.test_export.RootNameTests, bzrlib.tests.test_export_pot.PoEntryTestCase, bzrlib.tests.test_export_pot.TestEscape, bzrlib.tests.test_export_pot.TestNormalize, bzrlib.tests.test_features.Test_CompatibilityFeature, bzrlib.tests.test_features.TestFeature, bzrlib.tests.test_features.TestModuleAvailableFeature, bzrlib.tests.test_features.TestUnavailableFeature, bzrlib.tests.test_features.TestUnicodeFilenameFeature, bzrlib.tests.test_fifo_cache.TestFIFOCache, bzrlib.tests.test_fifo_cache.TestFIFOSizeCache, bzrlib.tests.test_filters.TestContentFilterContext, bzrlib.tests.test_filters.TestFilteredInput, bzrlib.tests.test_filters.TestFilteredOutput, bzrlib.tests.test_filters.TestFilterStackMaps, bzrlib.tests.test_foreign.ForeignRevisionTests, bzrlib.tests.test_foreign.ForeignVcsRegistryTests, bzrlib.tests.test_ftp_transport.TestFTPErrorTranslation, bzrlib.tests.test_generate_docs.TestGenerateDocs, bzrlib.tests.test_generate_ids.TestFileIds, bzrlib.tests.test_generate_ids.TestGenRevisionId, bzrlib.tests.test_globbing.TestExceptionGlobster, bzrlib.tests.test_globbing.TestGlobster, bzrlib.tests.test_globbing.TestNormalizePattern, bzrlib.tests.test_globbing.TestOrderedGlobster, bzrlib.tests.test_gpg.TestCommandLine, bzrlib.tests.test_gpg.TestDisabled, bzrlib.tests.test_gpg.TestVerify, bzrlib.tests.test_graph.TestCachingParentsProvider, bzrlib.tests.test_graph.TestCollapseLinearRegions, bzrlib.tests.test_graph.TestGraphBase, bzrlib.tests.test_graph.TestGraphThunkIdsToKeys, bzrlib.tests.test_graph.TestStackedParentsProvider, bzrlib.tests.test_groupcompress.Test_GCBuildDetails, bzrlib.tests.test_groupcompress.TestGroupCompressBlock, bzrlib.tests.test_groupcompress.TestGroupCompressor, bzrlib.tests.test_help.TestCommandHelp, bzrlib.tests.test_help.TestCommandHelpI18n, bzrlib.tests.test_help.TestHelp, bzrlib.tests.test_help.TestHelpIndices, bzrlib.tests.test_hooks.TestHook, bzrlib.tests.test_hooks.TestHookRegistry, bzrlib.tests.test_hooks.TestHooks, bzrlib.tests.test_http.Test_redirected_to, bzrlib.tests.test_http.TestActivity, bzrlib.tests.test_http.TestAuthHeader, bzrlib.tests.test_http.TestHttpProxyWhiteBox, bzrlib.tests.test_http.TestHTTPRangeParsing, bzrlib.tests.test_http.TestHttps_pycurl, bzrlib.tests.test_http.TestHTTPServer, bzrlib.tests.test_http.TestHttpTransportRegistration, bzrlib.tests.test_http.TestHttpTransportUrls, bzrlib.tests.test_http.TestHttpUrls, bzrlib.tests.test_http.TestNoReportActivity, bzrlib.tests.test_http.TestPost, bzrlib.tests.test_http.TestRangeHeader, bzrlib.tests.test_http.TestRecordingServer, bzrlib.tests.test_http_response.TestHandleResponse, bzrlib.tests.test_http_response.TestHTTPConnection, bzrlib.tests.test_http_response.TestRangeFileMultipleRanges, bzrlib.tests.test_http_response.TestRangeFileSingleRange, bzrlib.tests.test_http_response.TestRangeFileSizeKnown, bzrlib.tests.test_http_response.TestRangeFileSizeReadLimited, bzrlib.tests.test_http_response.TestRangeFileSizeUnknown, bzrlib.tests.test_http_response.TestRangeFileVarious, bzrlib.tests.test_i18n.LoadPluginTranslations, bzrlib.tests.test_i18n.TestGetText, bzrlib.tests.test_i18n.TestGetTextPerParagraph, bzrlib.tests.test_i18n.TestInstall, bzrlib.tests.test_i18n.TestZzzTranslation, bzrlib.tests.test_identitymap.TestIdentityMap, bzrlib.tests.test_identitymap.TestNullIdentityMap, bzrlib.tests.test_ignores.TestParseIgnoreFile, bzrlib.tests.test_ignores.TestRuntimeIgnores, bzrlib.tests.test_inv.TestDescribeChanges, bzrlib.tests.test_inv.TestInventoryEntry, bzrlib.tests.test_inv.TestInventoryUpdates, bzrlib.tests.test_inventory_delta.TestContent, bzrlib.tests.test_inventory_delta.TestDeserialization, bzrlib.tests.test_inventory_delta.TestSerialization, bzrlib.tests.test_knit.LowLevelKnitDataTests, bzrlib.tests.test_knit.LowLevelKnitIndexTests, bzrlib.tests.test_knit.TestAnnotatedKnitContent, bzrlib.tests.test_knit.TestPlainKnitContent, bzrlib.tests.test_lazy_import.TestCanonicalize, bzrlib.tests.test_lazy_import.TestConvertImportToMap, bzrlib.tests.test_lazy_import.TestFromToMap, bzrlib.tests.test_lazy_import.TestImportProcessor, bzrlib.tests.test_lazy_import.TestScopeReplacer, bzrlib.tests.test_lazy_import.TestScopeReplacerReentrance, bzrlib.tests.test_lazy_regex.TestInstallLazyCompile, bzrlib.tests.test_lazy_regex.TestLazyCompile, bzrlib.tests.test_lazy_regex.TestLazyRegex, bzrlib.tests.test_lockdir.TestLockHeldInfo, bzrlib.tests.test_log.TestLogFormatter, bzrlib.tests.test_log.TestReverseByDepth, bzrlib.tests.test_lru_cache.TestLRUCache, bzrlib.tests.test_lru_cache.TestLRUSizeCache, bzrlib.tests.test_lsprof.TestBzrProfiler, bzrlib.tests.test_mail_client.TestClaws, bzrlib.tests.test_mail_client.TestDefaultMail, bzrlib.tests.test_mail_client.TestEditor, bzrlib.tests.test_mail_client.TestEmacsMail, bzrlib.tests.test_mail_client.TestEvolution, bzrlib.tests.test_mail_client.TestKMail, bzrlib.tests.test_mail_client.TestMutt, bzrlib.tests.test_mail_client.TestThunderbird, bzrlib.tests.test_mail_client.TestXDGEmail, bzrlib.tests.test_matchers.TestReturnsUnlockable, bzrlib.tests.test_merge.TestLCAMultiWay, bzrlib.tests.test_merge3.TestMerge3, bzrlib.tests.test_merge_directive.TestMergeDirective1, bzrlib.tests.test_merge_directive.TestMergeDirective2, bzrlib.tests.test_merge_directive.TestParseOldMergeDirective2, bzrlib.tests.test_mutabletree.TestHooks, bzrlib.tests.test_nonascii.TestNormalization, bzrlib.tests.test_options.OptionTests, bzrlib.tests.test_options.TestListOptions, bzrlib.tests.test_options.TestOptionDefinitions, bzrlib.tests.test_options.TestVerboseQuietLinkage, bzrlib.tests.test_osutils.TestBackupNames, bzrlib.tests.test_osutils.TestChunksToLines, bzrlib.tests.test_osutils.TestConcurrency, bzrlib.tests.test_osutils.TestContainsWhitespace, bzrlib.tests.test_osutils.TestDateTime, bzrlib.tests.test_osutils.TestFailedToLoadExtension, bzrlib.tests.test_osutils.TestFindExecutableInPath, bzrlib.tests.test_osutils.TestGetuserUnicode, bzrlib.tests.test_osutils.TestIsInside, bzrlib.tests.test_osutils.TestPosixFuncs, bzrlib.tests.test_osutils.TestPumpFile, bzrlib.tests.test_osutils.TestPumpStringFile, bzrlib.tests.test_osutils.TestRandChars, bzrlib.tests.test_osutils.TestReCompile, bzrlib.tests.test_osutils.TestRelpath, bzrlib.tests.test_osutils.TestSafeFileId, bzrlib.tests.test_osutils.TestSafeRevisionId, bzrlib.tests.test_osutils.TestSafeUnicode, bzrlib.tests.test_osutils.TestSafeUtf8, bzrlib.tests.test_osutils.TestSetUnsetEnv, bzrlib.tests.test_osutils.TestSplitLines, bzrlib.tests.test_osutils.TestTerminalWidth, bzrlib.tests.test_osutils.TestWin32Funcs, bzrlib.tests.test_osutils_encodings.TestFakeCodec, bzrlib.tests.test_osutils_encodings.TestTerminalEncoding, bzrlib.tests.test_osutils_encodings.TestUserEncoding, bzrlib.tests.test_pack.PushParserTestCase, bzrlib.tests.test_pack.TestBytesRecordReader, bzrlib.tests.test_pack.TestContainerReader, bzrlib.tests.test_pack.TestContainerSerialiser, bzrlib.tests.test_pack.TestContainerWriter, bzrlib.tests.test_patches.PatchesTester, bzrlib.tests.test_plugins.TestEnvPluginPath, bzrlib.tests.test_plugins.TestHelpIndex, bzrlib.tests.test_plugins.TestLoadPluginAtSyntax, bzrlib.tests.test_plugins.TestModuleHelpTopic, bzrlib.tests.test_progress.TestTextProgressView, bzrlib.tests.test_pyutils.TestCalcParent_name, bzrlib.tests.test_pyutils.TestGetNamedObject, bzrlib.tests.test_registry.TestRegistry, bzrlib.tests.test_registry.TestRegistryIter, bzrlib.tests.test_remote.Test_ClientMedium_remote_is_at_least, bzrlib.tests.test_remote.Test_ClientMedium_remote_path_from_transport, bzrlib.tests.test_remote.TestBranchFormat, bzrlib.tests.test_remote.TestTransportIsReadonly, bzrlib.tests.test_remote.TestTransportMkdir, bzrlib.tests.test_remote.TestVfsHas, bzrlib.tests.test_repository.Test_LazyListJoin, bzrlib.tests.test_repository.TestDefaultFormat, bzrlib.tests.test_repository.TestRepositoryFormatRegistry, bzrlib.tests.test_revision.TestReservedId, bzrlib.tests.test_revision.TestRevisionBugs, bzrlib.tests.test_revision.TestRevisionMethods, bzrlib.tests.test_rio.TestRio, bzrlib.tests.test_rules.TestIniBasedRulesSearcher, bzrlib.tests.test_rules.TestRulesPath, bzrlib.tests.test_rules.TestStackedRulesSearcher, bzrlib.tests.test_scenarios.PretendVaryingTest, bzrlib.tests.test_scenarios.TestTestScenarios, bzrlib.tests.test_script.TestRedirections, bzrlib.tests.test_script.TestSyntax, bzrlib.tests.test_selftest.MetaTestLog, bzrlib.tests.test_selftest.SampleTestCase, bzrlib.tests.test_selftest.TestBlackboxSupport, bzrlib.tests.test_selftest.TestBranchScenarios, bzrlib.tests.test_selftest.TestBzrDirScenarios, bzrlib.tests.test_selftest.TestClassesAvailable, bzrlib.tests.test_selftest.TestCounterHooks, bzrlib.tests.test_selftest.TestDeprecations, bzrlib.tests.test_selftest.TestDocTestSuiteIsolation, bzrlib.tests.test_selftest.TestEnvironHandling, bzrlib.tests.test_selftest.TestExtraAssertions, bzrlib.tests.test_selftest.TestFilteredByModuleTestLoader, bzrlib.tests.test_selftest.TestFilteredByNameStartTestLoader, bzrlib.tests.test_selftest.TestInterRepositoryScenarios, bzrlib.tests.test_selftest.TestInterTreeScenarios, bzrlib.tests.test_selftest.TestIsolatedEnv, bzrlib.tests.test_selftest.TestIsolatedEnv.ScratchMonkey, bzrlib.tests.test_selftest.TestParallelFork, bzrlib.tests.test_selftest.TestPostMortemDebugging, bzrlib.tests.test_selftest.TestProfileResult, bzrlib.tests.test_selftest.TestRepositoryScenarios, bzrlib.tests.test_selftest.TestRunBzr, bzrlib.tests.test_selftest.TestRunner, bzrlib.tests.test_selftest.TestRunSuite, bzrlib.tests.test_selftest.TestSelftest, bzrlib.tests.test_selftest.TestSelftestExcludePatterns, bzrlib.tests.test_selftest.TestSelftestFiltering, bzrlib.tests.test_selftest.TestStartBzrSubProcess, bzrlib.tests.test_selftest.TestSubunitLogDetails, bzrlib.tests.test_selftest.TestTestCase, bzrlib.tests.test_selftest.TestTestCaseLogDetails, bzrlib.tests.test_selftest.TestTestCloning, bzrlib.tests.test_selftest.TestTestIdList, bzrlib.tests.test_selftest.TestTestLoader, bzrlib.tests.test_selftest.TestTestPrefixRegistry, bzrlib.tests.test_selftest.TestTestResult, bzrlib.tests.test_selftest.TestTestScenarioApplication, bzrlib.tests.test_selftest.TestTestSuite, bzrlib.tests.test_selftest.TestThreadLeakDetection, bzrlib.tests.test_selftest.TestTransportScenarios, bzrlib.tests.test_selftest.TestTreeScenarios, bzrlib.tests.test_selftest.TestUncollectedWarnings, bzrlib.tests.test_selftest.TestUncollectedWarnings.Test, bzrlib.tests.test_selftest.TestWarningTests, bzrlib.tests.test_selftest.TestWorkingTreeScenarios, bzrlib.tests.test_serializer.TestSerializer, bzrlib.tests.test_setup.TestSetup, bzrlib.tests.test_sftp_transport.SFTPNonServerTest, bzrlib.tests.test_sftp_transport.Test_SFTPReadvHelper, bzrlib.tests.test_sftp_transport.TestSocketDelay, bzrlib.tests.test_smart.TestByteStreamToStream, bzrlib.tests.test_smart.TestHandlers, bzrlib.tests.test_smart.TestSmartServerResponse, bzrlib.tests.test_smart_add.TestAddActions, bzrlib.tests.test_smart_request.TestRequestHanderErrorTranslation, bzrlib.tests.test_smart_request.TestSmartRequest, bzrlib.tests.test_smart_request.TestSmartRequestHandlerErrorTranslation, bzrlib.tests.test_smart_signals.TestInetServer, bzrlib.tests.test_smart_signals.TestSignalHandlers, bzrlib.tests.test_smart_transport.HTTPTunnellingSmokeTest, bzrlib.tests.test_smart_transport.LengthPrefixedBodyDecoder, bzrlib.tests.test_smart_transport.RemoteHTTPTransportTestCase, bzrlib.tests.test_smart_transport.RemoteTransportRegistration, bzrlib.tests.test_smart_transport.SmartClientMediumTests, bzrlib.tests.test_smart_transport.SmartTCPTests, bzrlib.tests.test_smart_transport.Test_SmartClient, bzrlib.tests.test_smart_transport.Test_SmartClientVersionDetection, bzrlib.tests.test_smart_transport.TestChunkedBodyDecoder, bzrlib.tests.test_smart_transport.TestConventionalRequestHandlerBodyStream, bzrlib.tests.test_smart_transport.TestConventionalResponseHandlerBodyStream, bzrlib.tests.test_smart_transport.TestFailedSmartServerResponse, bzrlib.tests.test_smart_transport.TestGetProtocolFactoryForBytes, bzrlib.tests.test_smart_transport.TestMessageHandlerErrors, bzrlib.tests.test_smart_transport.TestRemoteTransport, bzrlib.tests.test_smart_transport.TestResponseEncoderBufferingProtocolThree, bzrlib.tests.test_smart_transport.TestResponseEncodingProtocolThree, bzrlib.tests.test_smart_transport.TestSmartClientStreamMediumRequest, bzrlib.tests.test_smart_transport.TestSmartClientUnicode, bzrlib.tests.test_smart_transport.TestSmartProtocol, bzrlib.tests.test_smart_transport.TestSmartServerStreamMedium, bzrlib.tests.test_smart_transport.TestSmartTCPServer, bzrlib.tests.test_smart_transport.TestSuccessfulSmartServerResponse, bzrlib.tests.test_source.TestSourceHelper, bzrlib.tests.test_ssh_transport.SSHVendorManagerTests, bzrlib.tests.test_ssh_transport.SubprocessVendorsTests, bzrlib.tests.test_store.TestInstrumentedTransportStore, bzrlib.tests.test_store.TestMemoryStore, bzrlib.tests.test_store.TestMockTransport, bzrlib.tests.test_store.TestTransportStore, bzrlib.tests.test_symbol_versioning.TestDeprecationWarnings, bzrlib.tests.test_symbol_versioning.TestSuppressAndActivate, bzrlib.tests.test_tag.TestTagSerialization, bzrlib.tests.test_test_server.TestTCPServerInAThread, bzrlib.tests.test_test_server.TestTestingSmartConnectionHandler, bzrlib.tests.test_test_server.TestTestingSmartServer, bzrlib.tests.test_textfile.TextFile, bzrlib.tests.test_textmerge.TestMerge2, bzrlib.tests.test_timestamp.TestPatchHeader, bzrlib.tests.test_timestamp.UnpackHighresDateTests, bzrlib.tests.test_trace.TestTrace, bzrlib.tests.test_trace.TestVerbosityLevel, bzrlib.tests.test_transactions.TestPassThroughTransaction, bzrlib.tests.test_transactions.TestReadOnlyTransaction, bzrlib.tests.test_transactions.TestSymbols, bzrlib.tests.test_transactions.TestWriteTransaction, bzrlib.tests.test_transform.TestBackupName, bzrlib.tests.test_transport.ChrootDecoratorTransportTest, bzrlib.tests.test_transport.PathFilteringDecoratorTransportTest, bzrlib.tests.test_transport.ReadonlyDecoratorTransportTest, bzrlib.tests.test_transport.TestChrootServer, bzrlib.tests.test_transport.TestCoalesceOffsets, bzrlib.tests.test_transport.TestConnectedTransport, bzrlib.tests.test_transport.TestLocalTransports, bzrlib.tests.test_transport.TestLocationToUrl, bzrlib.tests.test_transport.TestMemoryServer, bzrlib.tests.test_transport.TestMemoryTransport, bzrlib.tests.test_transport.TestReusedTransports, bzrlib.tests.test_transport.TestTransport, bzrlib.tests.test_transport.TestTransportTrace, bzrlib.tests.test_transport.TestUnhtml, bzrlib.tests.test_transport.TestWin32LocalTransport, bzrlib.tests.test_tsort.MergeSortTests, bzrlib.tests.test_tsort.TopoSortTests, bzrlib.tests.test_tuned_gzip.TestFakeDecompress, bzrlib.tests.test_tuned_gzip.TestGzip, bzrlib.tests.test_tuned_gzip.TestToGzip, bzrlib.tests.test_ui.CannedInputUIFactoryTests, bzrlib.tests.test_ui.SilentUITests, bzrlib.tests.test_ui.TestBoolFromString, bzrlib.tests.test_ui.TestConfirmationUserInterfacePolicy, bzrlib.tests.test_ui.TestProgressRecordingUI, bzrlib.tests.test_ui.TestTextUIFactory, bzrlib.tests.test_ui.TestTextUIOutputStream, bzrlib.tests.test_ui.TestUIFactoryTests, bzrlib.tests.test_ui.UITests, bzrlib.tests.test_urlutils.TestDeriveToLocation, bzrlib.tests.test_urlutils.TestParseURL, bzrlib.tests.test_urlutils.TestRebaseURL, bzrlib.tests.test_urlutils.TestURL, bzrlib.tests.test_urlutils.TestUrlToPath, bzrlib.tests.test_utextwrap.TestIndent, bzrlib.tests.test_utextwrap.TestIndent 0, bzrlib.tests.test_utextwrap.TestLongWord, bzrlib.tests.test_utextwrap.TestLongWord 0, bzrlib.tests.test_utextwrap.TestUTextFill, bzrlib.tests.test_utextwrap.TestUTextWrap, bzrlib.tests.test_utextwrap.TestUTextWrapAmbiWidth, bzrlib.tests.test_utextwrap.TestWrap, bzrlib.tests.test_utextwrap.TestWrap 0, bzrlib.tests.test_version.TestBzrlibVersioning, bzrlib.tests.test_version_info.TestVersionInfoFormatRegistry, bzrlib.tests.test_weave.TestBase, bzrlib.tests.test_weave.TestNeedsReweave, bzrlib.tests.test_weave.TestWeave, bzrlib.tests.test_win32utils.TestAppPaths, bzrlib.tests.test_win32utils.TestLocationsCtypes, bzrlib.tests.test_workingtree.TestInstrumentedTree, bzrlib.tests.test_workingtree.TestWorkingTreeFormatRegistry, bzrlib.tests.test_wsgi.TestWSGI, bzrlib.tests.test_xml.TestEncodeAndEscape, bzrlib.tests.test_xml.TestMisc, bzrlib.tests.test_xml.TestSerializer, bzrlib.tests.TestCaseWithMemoryTransport

Base class for bzr unit tests.

Tests that need access to disk resources should subclass TestCaseInTempDir not TestCase.

Error and debug log messages are redirected from their usual location into a temporary file, the contents of which can be retrieved by _get_log(). We use a real OS file, not an in-memory object, so that it can also capture file IO. When the test completes this file is read into memory and removed from disk.

There are also convenience functions to invoke bzr's command-line routine, and to build and check bzr trees.

In addition to the usual method of overriding tearDown(), this class also allows subclasses to register cleanup functions via addCleanup, which are run in order as the object is torn down. It's less likely this will be accidentally overlooked.

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 __init__(self, methodName='testMethod'):
Undocumented
def setUp(self):
overridden in bzrlib.plugins.bash_completion.tests.test_bashcomp.TestDataCollector, bzrlib.plugins.launchpad.test_lp_api.TestDependencyManagement, bzrlib.plugins.launchpad.test_lp_directory.TestXMLRPCTransport, bzrlib.plugins.launchpad.test_lp_service.LaunchpadServiceTests, bzrlib.tests.per_uifactory.TestCannedInputUIFactory, bzrlib.tests.per_uifactory.TestSilentUIFactory, bzrlib.tests.per_uifactory.TestTextUIFactory, bzrlib.tests.per_versionedfile.VirtualVersionedFilesTests, bzrlib.tests.test__btree_serializer.TestBtreeSerializer, bzrlib.tests.test__groupcompress.TestDeltaIndex, bzrlib.tests.test__groupcompress.TestMakeAndApplyDelta, bzrlib.tests.test_branch.TestBranchFormatRegistry, bzrlib.tests.test_cache_utf8.TestEncodeCache, bzrlib.tests.test_cleanup.CleanupsTestCase, bzrlib.tests.test_commands.TestRegisterLazy, bzrlib.tests.test_config.TestCommandLineSection, bzrlib.tests.test_config.TestConfigPath, bzrlib.tests.test_config.TestOptionRegistry, bzrlib.tests.test_config.TestRegisteredOptions, bzrlib.tests.test_conflicts.TestResolveActionOption, bzrlib.tests.test_controldir.TestMetaComponentFormatRegistry, bzrlib.tests.test_diff.TestPatienceDiffLib, bzrlib.tests.test_directory_service.TestDirectoryLookup, bzrlib.tests.test_export_pot.PoEntryTestCase, bzrlib.tests.test_generate_docs.TestGenerateDocs, bzrlib.tests.test_graph.TestCachingParentsProvider, bzrlib.tests.test_graph.TestStackedParentsProvider, bzrlib.tests.test_help.TestCommandHelpI18n, bzrlib.tests.test_help.TestHelp, bzrlib.tests.test_http.TestActivity, bzrlib.tests.test_http.TestHTTPRangeParsing, bzrlib.tests.test_http.TestNoReportActivity, bzrlib.tests.test_http_response.TestRangeFileMultipleRanges, bzrlib.tests.test_http_response.TestRangeFileSingleRange, bzrlib.tests.test_http_response.TestRangeFileSizeKnown, bzrlib.tests.test_http_response.TestRangeFileSizeReadLimited, bzrlib.tests.test_http_response.TestRangeFileSizeUnknown, bzrlib.tests.test_i18n.TestGetText, bzrlib.tests.test_i18n.TestGetTextPerParagraph, bzrlib.tests.test_i18n.TestInstall, bzrlib.tests.test_ignores.TestRuntimeIgnores, bzrlib.tests.test_lazy_import.TestScopeReplacer, bzrlib.tests.test_log.TestLogFormatter, bzrlib.tests.test_osutils.TestBackupNames, bzrlib.tests.test_osutils.TestConcurrency, bzrlib.tests.test_osutils.TestFailedToLoadExtension, bzrlib.tests.test_osutils.TestPumpFile, bzrlib.tests.test_osutils.TestSetUnsetEnv, bzrlib.tests.test_osutils.TestTerminalWidth, bzrlib.tests.test_osutils_encodings.TestTerminalEncoding, bzrlib.tests.test_osutils_encodings.TestUserEncoding, bzrlib.tests.test_pack.TestContainerWriter, bzrlib.tests.test_plugins.TestEnvPluginPath, bzrlib.tests.test_registry.TestRegistryIter, bzrlib.tests.test_repository.TestRepositoryFormatRegistry, bzrlib.tests.test_rules.TestRulesPath, bzrlib.tests.test_selftest.TestCounterHooks, bzrlib.tests.test_selftest.TestSelftestExcludePatterns, bzrlib.tests.test_selftest.TestSelftestFiltering, bzrlib.tests.test_sftp_transport.SFTPNonServerTest, bzrlib.tests.test_sftp_transport.TestSocketDelay, bzrlib.tests.test_smart_signals.TestSignalHandlers, bzrlib.tests.test_smart_transport.HTTPTunnellingSmokeTest, bzrlib.tests.test_smart_transport.TestResponseEncoderBufferingProtocolThree, bzrlib.tests.test_smart_transport.TestSmartProtocol, bzrlib.tests.test_smart_transport.TestSmartServerStreamMedium, bzrlib.tests.test_smart_transport.WritableEndToEndTests, bzrlib.tests.test_symbol_versioning.TestDeprecationWarnings, bzrlib.tests.test_symbol_versioning.TestSuppressAndActivate, bzrlib.tests.test_transactions.TestReadOnlyTransaction, bzrlib.tests.test_transactions.TestWriteTransaction, bzrlib.tests.test_utextwrap.TestIndent 0, bzrlib.tests.test_utextwrap.TestLongWord 0, bzrlib.tests.test_utextwrap.TestWrap 0, bzrlib.tests.test_version_info.TestVersionInfoFormatRegistry, bzrlib.tests.test_weave.JoinWeavesTests, bzrlib.tests.test_win32utils.TestLocationsPywin32, bzrlib.tests.test_workingtree.TestWorkingTreeFormatRegistry, bzrlib.tests.test_wsgi.TestWSGI, bzrlib.tests.test_xml.TestEncodeAndEscape, bzrlib.tests.TestCaseWithMemoryTransport
Undocumented
def debug(self):
Undocumented
def discardDetail(self, name):
Extend the addDetail, getDetails api so we can remove a detail.

eg. bzr always adds the 'log' detail at startup, but we don't want to include it for skipped, xfail, etc tests.

It is safe to call this for a detail that doesn't exist, in case this gets called multiple times.

def install_counter_hook(self, hooks, name, counter_name=None):
Install a counting hook.

Any hook can be counted as long as it doesn't need to return a value.

ParametershooksWhere the hook should be installed.
nameThe hook name that will be counted.
counter_nameThe counter identifier in _counters, defaults to name.
def _install_config_stats_hooks(self):
Install config hooks to count hook calls.
def _clear_debug_flags(self):
Prevent externally set debug flags affecting tests.

Tests that want to use debug flags can just set them in the debug_flags set during setup/teardown.

def _clear_hooks(self):
Undocumented
def disable_directory_isolation(self):
Turn off directory isolation checks.
def enable_directory_isolation(self):
Enable directory isolation checks.
def _silenceUI(self):
Turn off UI for duration of test
def _check_locks(self):
Check that all lock take/release actions have been paired.
def _track_locks(self):
Track lock activity during tests.
def _lock_acquired(self, result):
Undocumented
def _lock_released(self, result):
Undocumented
def _lock_broken(self, result):
Undocumented
def permit_dir(self, name):
Permit a directory to be used by this test. See permit_url.
def permit_url(self, url):
Declare that url is an ok url to use in this test.

Do this for memory transports, temporary test directory etc.

Do not do this for the current working directory, /tmp, or any other preexisting non isolated url.

def permit_source_tree_branch_repo(self):
Permit the source tree bzr is running from to be opened.

Some code such as bzrlib.version attempts to read from the bzr branch that bzr is executing from (if any). This method permits that directory to be used in the test suite.

def _preopen_isolate_transport(self, transport):
Check that all transport openings are done in the test work area.
def _preopen_isolate_url(self, url):
Undocumented
def record_directory_isolation(self):
Gather accessed directories to permit later access.

This is used for tests that access the branch bzr is running from.

def start_server(self, transport_server, backing_server=None):
Start transport_server for this test.

This starts the server, registers a cleanup for it and permits the server's urls to be used.

def _track_transports(self):
Install checks for transport usage.
def _ndiff_strings(self, a, b):
Return ndiff between two strings containing lines.

A trailing newline is added if missing to make the strings print properly.

def assertEqual(self, a, b, message=''):
Undocumented
def assertEqualDiff(self, a, b, message=None):
Assert two texts are equal, if not raise an exception.

This is intended for use with multi-line strings where it can be hard to find the differences by eye.

def assertEqualMode(self, mode, mode_test):
Undocumented
def assertEqualStat(self, expected, actual):
assert that expected and actual are the same stat result.
ParametersexpectedA stat result.
actualA stat result.
RaisesAssertionErrorIf the expected and actual stat values differ other than by atime.
def assertLength(self, length, obj_with_len):
Assert that obj_with_len is of length length.
def assertLogsError(self, exception_class, func, *args, **kwargs):
Assert that func(*args, **kwargs) quietly logs a specific error.
def assertPositive(self, val):
Assert that val is greater than 0.
def assertNegative(self, val):
Assert that val is less than 0.
def assertStartsWith(self, s, prefix):
Undocumented
def assertEndsWith(self, s, suffix):
Asserts that s ends with suffix.
def assertContainsRe(self, haystack, needle_re, flags=0):
Assert that a contains something matching a regular expression.
def assertNotContainsRe(self, haystack, needle_re, flags=0):
Assert that a does not match a regular expression
def assertContainsString(self, haystack, needle):
Undocumented
def assertNotContainsString(self, haystack, needle):
Undocumented
def assertSubset(self, sublist, superlist):
Assert that every entry in sublist is present in superlist.
def assertListRaises(self, excClass, func, *args, **kwargs):
Fail unless excClass is raised when the iterator from func is used.

Many functions can return generators this makes sure to wrap them in a list() call to make sure the whole generator is run, and that the proper exception is raised.

def assertRaises(self, excClass, callableObj, *args, **kwargs):
Assert that a callable raises a particular exception.

Returns the exception so that you can examine it.

ParametersexcClassAs for the except statement, this may be either an exception class, or a tuple of classes.
callableObjA callable, will be passed *args and **kwargs.
def assertIs(self, left, right, message=None):
Undocumented
def assertIsNot(self, left, right, message=None):
Undocumented
def assertTransportMode(self, transport, path, mode):
Fail if a path does not have mode "mode".

If modes are not supported on this transport, the assertion is ignored.

def assertIsSameRealPath(self, path1, path2):
Fail if path1 and path2 points to different files
def assertIsInstance(self, obj, kls, msg=None):
Fail if obj is not an instance of kls
ParametersmsgSupplementary message to show if the assertion fails.
def assertFileEqual(self, content, path):
Fail if path does not contain 'content'.
def assertDocstring(self, expected_docstring, obj):
Fail if obj does not have expected_docstring
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4)))
def failUnlessExists(self, path):
Undocumented
def assertPathExists(self, path):
Fail unless path or paths, which may be abs or relative, exist.
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4)))
def failIfExists(self, path):
Undocumented
def assertPathDoesNotExist(self, path):
Fail if path or paths, which may be abs or relative, exist.
def _capture_deprecation_warnings(self, a_callable, *args, **kwargs):
A helper for callDeprecated and applyDeprecated.
Parametersa_callableA callable to call.
argsThe positional arguments for the callable
kwargsThe keyword arguments for the callable
ReturnsA tuple (warnings, result). result is the result of calling a_callable(*args, **kwargs).
def applyDeprecated(self, deprecation_format, a_callable, *args, **kwargs):
Call a deprecated callable without warning the user.

Note that this only captures warnings raised by symbol_versioning.warn,
not other callers that go direct to the warning module.

To test that a deprecated method raises an error, do something like
this (remember that both assertRaises and applyDeprecated delays *args
and **kwargs passing)::

    self.assertRaises(errors.ReservedId,
        self.applyDeprecated,
        deprecated_in((1, 5, 0)),
        br.append_revision,
        'current:')

:param deprecation_format: The deprecation format that the callable
    should have been deprecated with. This is the same type as the
    parameter to deprecated_method/deprecated_function. If the
    callable is not deprecated with this format, an assertion error
    will be raised.
:param a_callable: A callable to call. This may be a bound method or
    a regular function. It will be called with ``*args`` and
    ``**kwargs``.
:param args: The positional arguments for the callable
:param kwargs: The keyword arguments for the callable
:return: The result of a_callable(``*args``, ``**kwargs``)
def callCatchWarnings(self, fn, *args, **kw):
Call a callable that raises python warnings.

The caller's responsible for examining the returned warnings.

If the callable raises an exception, the exception is not caught and propagates up to the caller. In that case, the list of warnings is not available.

Returns([warning_object, ...], fn_result)
def callDeprecated(self, expected, callable, *args, **kwargs):
Assert that a callable is deprecated in a particular way.

This is a very precise test for unusual requirements. The applyDeprecated helper function is probably more suited for most tests as it allows you to simply specify the deprecation format being used and will ensure that that is issued for the function being called.

Note that this only captures warnings raised by symbol_versioning.warn, not other callers that go direct to the warning module. To catch general warnings, use callCatchWarnings.

Parametersexpecteda list of the deprecation warnings expected, in order
callableThe callable to call
argsThe positional arguments for the callable
kwargsThe keyword arguments for the callable
def _startLogFile(self):
Setup a in-memory target for bzr and testcase log messages
def _finishLogFile(self):
Flush and dereference the in-memory log for this testcase
def thisFailsStrictLockCheck(self):
It is known that this test would fail with -Dstrict_locks.

By default, all tests are run with strict lock checking unless -Edisable_lock_checks is supplied. However there are some tests which we know fail strict locks at this point that have not been fixed. They should call this function to disable the strict checking.

This should be used sparingly, it is much better to fix the locking issues rather than papering over the problem by calling this function.

def overrideAttr(self, obj, attr_name, new=_unitialized_attr):
Overrides an object attribute restoring it after the test.

:note: This should be used with discretion; you should think about
whether it's better to make the code testable without monkey-patching.

:param obj: The object that will be mutated.

:param attr_name: The attribute name we want to preserve/override in
    the object.

:param new: The optional value we want to set the attribute to.

:returns: The actual attr value.
def overrideEnv(self, name, new):
Set an environment variable, and reset it after the test.
ParametersnameThe environment variable name.
newThe value to set the variable to. If None, the variable is deleted from the environment.
ReturnsThe actual variable value.
def recordCalls(self, obj, attr_name):
Monkeypatch in a wrapper that will record calls.

The monkeypatch is automatically removed when the test concludes.

ParametersobjThe namespace holding the reference to be replaced; typically a module, class, or object.
attr_nameA string for the name of the attribute to patch.
ReturnsA list that will be extended with one item every time the function is called, with a tuple of (args, kwargs).
def _cleanEnvironment(self):
Undocumented
def _restoreHooks(self):
Undocumented
def knownFailure(self, reason):
Declare that this test fails for a known reason

Tests that are known to fail should generally be using expectedFailure with an appropriate reverse assertion if a change could cause the test to start passing. Conversely if the test has no immediate prospect of succeeding then using skip is more suitable.

When this method is called while an exception is being handled, that traceback will be used, otherwise a new exception will be thrown to provide one but won't be reported.

def _suppress_log(self):
Remove the log info from details.
def _do_skip(self, result, reason):
Undocumented
@staticmethod
def _do_known_failure(self, result, e):
Undocumented
@staticmethod
def _do_not_applicable(self, result, e):
Undocumented
@staticmethod
def _report_skip(self, result, err):
Override the default _report_skip.

We want to strip the 'log' detail. If we waint until _do_skip, it has already been formatted into the 'reason' string, and we can't pull it out again.

@staticmethod
def _report_expected_failure(self, result, err):
Strip the log.

See _report_skip for motivation.

@staticmethod
def _do_unsupported_or_skip(self, result, e):
Undocumented
def time(self, callable, *args, **kwargs):
Run callable and accrue the time it takes to the benchmark time.

If lsprofiling is enabled (i.e. by --lsprof-time to bzr selftest) then this will cause lsprofile statistics to be gathered and stored in self._benchcalls.

def log(self, *args):
Undocumented
def get_log(self):
Get a unicode string containing the log from bzrlib.trace.

Undecodable characters are replaced.

def requireFeature(self, feature):
This test requires a specific feature is available.
RaisesUnavailableFeatureWhen feature is not available.
def _run_bzr_autosplit(self, args, retcode, encoding, stdin, working_dir):
Run bazaar command line, splitting up a string command line.
def _run_bzr_core(self, args, retcode, encoding, stdin, working_dir):
Undocumented
def run_bzr(self, args, retcode=0, encoding=None, stdin=None, working_dir=None, error_regexes=, output_encoding=None):
Invoke bzr, as if it were run from the command line.

The argument list should not include the bzr program name - the first argument is normally the bzr command. Arguments may be passed in three ways:

1- A list of strings, eg ["commit", "a"]. This is recommended when the command contains whitespace or metacharacters, or is built up at run time.

2- A single string, eg "add a". This is the most convenient for hardcoded commands.

This runs bzr through the interface that catches and reports errors, and with logging set to something approximating the default, so that error reporting can be checked.

This should be the main method for tests that want to exercise the overall behavior of the bzr application (rather than a unit test or a functional test of the library.)

This sends the stdout/stderr results into the test's log, where it may be useful for debugging. See also run_captured.

ParametersstdinA string to be used as stdin for the command.
retcodeThe status code the command should return; default 0.
working_dirThe directory to run the command in
error_regexesA list of expected error messages. If specified they must be seen in the error output of the command.
def run_bzr_error(self, error_regexes, *args, **kwargs):

Run bzr, and check that stderr contains the supplied regexes

Examples of use:

# Make sure that commit is failing because there is nothing to do
self.run_bzr_error(['no changes to commit'],
                   ['commit', '-m', 'my commit comment'])
# Make sure --strict is handling an unknown file, rather than
# giving us the 'nothing to do' error
self.build_tree(['unknown'])
self.run_bzr_error(['Commit refused because there are unknown files'],
                   ['commit', --strict', '-m', 'my commit comment'])
Parameterserror_regexesSequence of regular expressions which must each be found in the error output. The relative ordering is not enforced.
argscommand-line arguments for bzr
kwargsKeyword arguments which are interpreted by run_bzr This function changes the default value of retcode to be 3, since in most cases this is run when you expect bzr to fail.
Returns(out, err) The actual output of running the command (in case you want to do more inspection)
def run_bzr_subprocess(self, *args, **kwargs):
Run bzr in a subprocess for testing.

This starts a new Python interpreter and runs bzr in there. This should only be used for tests that have a justifiable need for this isolation: e.g. they are testing startup time, or signal handling, or early startup code, etc. Subprocess code can't be profiled or debugged so easily.

ParametersretcodeThe status code that is expected. Defaults to 0. If None is supplied, the status code is not checked.
env_changesA dictionary which lists changes to environment variables. A value of None will unset the env variable. The values must be strings. The change will only occur in the child, so you don't need to fix the environment after running.
universal_newlinesConvert CRLF => LF
allow_pluginsBy default the subprocess is run with --no-plugins to ensure test reproducibility. Also, it is possible for system-wide plugins to create unexpected output on stderr, which can cause unnecessary test failures.
def start_bzr_subprocess(self, process_args, env_changes=None, skip_if_plan_to_signal=False, working_dir=None, allow_plugins=False, stderr=subprocess.PIPE):
Start bzr in a subprocess for testing.

This starts a new Python interpreter and runs bzr in there. This should only be used for tests that have a justifiable need for this isolation: e.g. they are testing startup time, or signal handling, or early startup code, etc. Subprocess code can't be profiled or debugged so easily.

Parametersprocess_argsa list of arguments to pass to the bzr executable, for example ['--version'].
env_changesA dictionary which lists changes to environment variables. A value of None will unset the env variable. The values must be strings. The change will only occur in the child, so you don't need to fix the environment after running.
skip_if_plan_to_signalraise TestSkipped when true and system doesn't support signalling subprocesses.
allow_pluginsIf False (default) pass --no-plugins to bzr.
stderrfile to use for the subprocess's stderr. Valid values are those valid for the stderr argument of subprocess.Popen. Default value is subprocess.PIPE.
ReturnsPopen object for the started process.
def _add_subprocess_log(self, log_file_path):
Undocumented
def _subprocess_log_cleanup(self):
Undocumented
def _popen(self, *args, **kwargs):
Place a call to Popen.

Allows tests to override this method to intercept the calls made to Popen for introspection.

def get_source_path(self):
Return the path of the directory containing bzrlib.
def get_bzr_path(self):
Return the path of the 'bzr' executable for this test suite.
def finish_bzr_subprocess(self, process, retcode=0, send_signal=None, universal_newlines=False, process_args=None):
Finish the execution of process.
Parametersprocessthe Popen object returned from start_bzr_subprocess.
retcodeThe status code that is expected. Defaults to 0. If None is supplied, the status code is not checked.
send_signalan optional signal to send to the process.
universal_newlinesConvert CRLF => LF
Returns(stdout, stderr)
def check_tree_shape(self, tree, shape):
Compare a tree to a list of expected names.

Fail if they are not precisely equal.

def apply_redirected(self, *args, stdin=None, stdout=None, stderr=None, a_callable=None, **kwargs):
Call callable with redirected std io pipes.

Returns the return code.

def reduceLockdirTimeout(self):
Reduce the default lock timeout for the duration of the test, so that if LockContention occurs during a test, it does so quickly.

Tests that expect to provoke LockContention errors should call this.

def make_utf8_encoded_stringio(self, encoding_type=None):
Return a StringIOWrapper instance, that will encode Unicode input to UTF-8.
def disable_verb(self, verb):
Disable a smart server verb for one test.
API Documentation for Bazaar, generated by pydoctor at 2017-12-15 00:15:45.