def load_tests(basic_tests, module, loader): result = loader.suiteClass() # load the tests of the infrastructure for these tests result.addTests(basic_tests) default_tree_format = WorkingTreeFormat3() test_intertree_implementations = [ 'bzrlib.tests.intertree_implementations.test_compare', ] test_intertree_permutations = [ # test InterTree with two default-format working trees. (InterTree, default_tree_format, default_tree_format, return_provided_trees)] for optimiser in InterTree._optimisers: test_intertree_permutations.append( (optimiser, optimiser._matching_from_tree_format, optimiser._matching_to_tree_format, optimiser._test_mutable_trees_to_test_trees)) adapter = InterTreeTestProviderAdapter( default_transport, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, test_intertree_permutations) # add the tests for the sub modules adapt_modules(test_intertree_implementations, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_tree_implementations = [ 'bzrlib.tests.tree_implementations.test_annotate_iter', 'bzrlib.tests.tree_implementations.test_get_file_mtime', 'bzrlib.tests.tree_implementations.test_get_root_id', 'bzrlib.tests.tree_implementations.test_get_symlink_target', 'bzrlib.tests.tree_implementations.test_inv', 'bzrlib.tests.tree_implementations.test_iter_search_rules', 'bzrlib.tests.tree_implementations.test_list_files', 'bzrlib.tests.tree_implementations.test_path_content_summary', 'bzrlib.tests.tree_implementations.test_revision_tree', 'bzrlib.tests.tree_implementations.test_test_trees', 'bzrlib.tests.tree_implementations.test_tree', 'bzrlib.tests.tree_implementations.test_walkdirs', ] adapter = TreeTestProviderAdapter( default_transport, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, WorkingTreeFormat._formats.values() + _legacy_formats) # add the tests for the sub modules adapt_modules(test_tree_implementations, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # load the tests of the infrastructure for these tests result.addTests(basic_tests) default_tree_format = WorkingTreeFormat3() test_intertree_implementations = [ 'bzrlib.tests.intertree_implementations.test_compare', ] test_intertree_permutations = [ # test InterTree with two default-format working trees. (InterTree, default_tree_format, default_tree_format, return_provided_trees) ] for optimiser in InterTree._optimisers: test_intertree_permutations.append( (optimiser, optimiser._matching_from_tree_format, optimiser._matching_to_tree_format, optimiser._test_mutable_trees_to_test_trees)) adapter = InterTreeTestProviderAdapter( default_transport, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, test_intertree_permutations) # add the tests for the sub modules adapt_modules(test_intertree_implementations, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_workingtree_implementations = [ 'bzrlib.tests.workingtree_implementations.test_add_reference', 'bzrlib.tests.workingtree_implementations.test_add', 'bzrlib.tests.workingtree_implementations.test_basis_inventory', 'bzrlib.tests.workingtree_implementations.test_basis_tree', 'bzrlib.tests.workingtree_implementations.test_break_lock', 'bzrlib.tests.workingtree_implementations.test_changes_from', 'bzrlib.tests.workingtree_implementations.test_commit', 'bzrlib.tests.workingtree_implementations.test_executable', 'bzrlib.tests.workingtree_implementations.test_flush', 'bzrlib.tests.workingtree_implementations.test_get_file_mtime', 'bzrlib.tests.workingtree_implementations.test_get_parent_ids', 'bzrlib.tests.workingtree_implementations.test_inv', 'bzrlib.tests.workingtree_implementations.test_is_control_filename', 'bzrlib.tests.workingtree_implementations.test_is_ignored', 'bzrlib.tests.workingtree_implementations.test_locking', 'bzrlib.tests.workingtree_implementations.test_merge_from_branch', 'bzrlib.tests.workingtree_implementations.test_mkdir', 'bzrlib.tests.workingtree_implementations.test_move', 'bzrlib.tests.workingtree_implementations.test_nested_specifics', 'bzrlib.tests.workingtree_implementations.test_parents', 'bzrlib.tests.workingtree_implementations.test_paths2ids', 'bzrlib.tests.workingtree_implementations.test_pull', 'bzrlib.tests.workingtree_implementations.test_put_file', 'bzrlib.tests.workingtree_implementations.test_readonly', 'bzrlib.tests.workingtree_implementations.test_read_working_inventory', 'bzrlib.tests.workingtree_implementations.test_remove', 'bzrlib.tests.workingtree_implementations.test_rename_one', 'bzrlib.tests.workingtree_implementations.test_revision_tree', 'bzrlib.tests.workingtree_implementations.test_set_root_id', 'bzrlib.tests.workingtree_implementations.test_smart_add', 'bzrlib.tests.workingtree_implementations.test_uncommit', 'bzrlib.tests.workingtree_implementations.test_unversion', 'bzrlib.tests.workingtree_implementations.test_walkdirs', 'bzrlib.tests.workingtree_implementations.test_workingtree', ] adapter = WorkingTreeTestProviderAdapter( default_transport, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, WorkingTreeFormat._formats.values() + _legacy_formats) # add the tests for the sub modules adapt_modules(test_workingtree_implementations, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_lock_implementations = [ 'bzrlib.tests.per_lock.test_lock', 'bzrlib.tests.per_lock.test_temporary_write_lock', ] adapter = LockTestProviderAdapter(lock._lock_classes) # add the tests for the sub modules tests.adapt_modules(test_lock_implementations, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) prefix = 'bzrlib.tests.repository_implementations.' test_repository_modules = [ 'test_add_fallback_repository', 'test_break_lock', 'test_check', # test_check_reconcile is intentionally omitted, see below. 'test_commit_builder', 'test_fetch', 'test_fileid_involved', 'test_find_text_key_references', 'test__generate_text_key_index', 'test_get_parent_map', 'test_has_same_location', 'test_has_revisions', 'test_is_write_locked', 'test_iter_reverse_revision_history', 'test_pack', 'test_reconcile', 'test_repository', 'test_revision', 'test_statistics', 'test_write_group', ] module_name_list = [prefix + module_name for module_name in test_repository_modules] # add the tests for the sub modules # Parameterize repository_implementations test modules by format. format_scenarios = all_repository_format_scenarios() result.addTests(multiply_tests_from_modules(module_name_list, format_scenarios, loader)) # test_check_reconcile needs to be parameterized by format *and* by broken # repository scenario. broken_scenarios = [(s.__name__, {'scenario_class': s}) for s in all_broken_scenario_classes] broken_scenarios_for_all_formats = multiply_scenarios( format_scenarios, broken_scenarios) broken_scenario_applier = TestScenarioApplier() broken_scenario_applier.scenarios = broken_scenarios_for_all_formats adapt_modules( [prefix + 'test_check_reconcile'], broken_scenario_applier, loader, result) return result
def load_tests(standard_tests, module, loader): adapter = TestScenarioApplier() adapter.scenarios = external_reference_test_scenarios() module_list = [ 'bzrlib.tests.per_repository_reference.test_add_inventory', 'bzrlib.tests.per_repository_reference.test_add_revision', 'bzrlib.tests.per_repository_reference.test_add_signature_text', 'bzrlib.tests.per_repository_reference.test_all_revision_ids', 'bzrlib.tests.per_repository_reference.test_break_lock', 'bzrlib.tests.per_repository_reference.test_check', ] # Parameterize repository_implementations test modules by format. result = TestSuite() adapt_tests(standard_tests, adapter, result) adapt_modules(module_list, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_interrepository_implementations = [ 'bzrlib.tests.interrepository_implementations.test_fetch', 'bzrlib.tests.interrepository_implementations.test_interrepository', ] adapter = InterRepositoryTestProviderAdapter( default_transport, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, InterRepositoryTestProviderAdapter.default_test_list()) # add the tests for the sub modules adapt_modules(test_interrepository_implementations, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_interrepository_implementations = [ 'bzrlib.tests.interrepository_implementations.test_fetch', 'bzrlib.tests.interrepository_implementations.test_interrepository', ] adapter = InterRepositoryTestProviderAdapter( default_transport, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, InterRepositoryTestProviderAdapter.default_test_list() ) # add the tests for the sub modules adapt_modules(test_interrepository_implementations, adapter, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_bzrdir_implementations = [ 'bzrlib.tests.bzrdir_implementations.test_bzrdir', ] formats = BzrDirFormat.known_formats() adapter = BzrDirTestProviderAdapter( default_transport, None, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, formats) # add the tests for the sub modules adapt_modules(test_bzrdir_implementations, adapter, loader, result) # This will always add the tests for smart server transport, regardless of # the --transport option the user specified to 'bzr selftest'. from bzrlib.smart.server import ( ReadonlySmartTCPServer_for_testing, ReadonlySmartTCPServer_for_testing_v2_only, SmartTCPServer_for_testing, SmartTCPServer_for_testing_v2_only, ) from bzrlib.remote import RemoteBzrDirFormat # test the remote server behaviour using a MemoryTransport smart_server_suite = loader.suiteClass() adapt_to_smart_server = BzrDirTestProviderAdapter( MemoryServer, SmartTCPServer_for_testing, ReadonlySmartTCPServer_for_testing, [(RemoteBzrDirFormat())], name_suffix='-default') adapt_modules(test_bzrdir_implementations, adapt_to_smart_server, loader, smart_server_suite) adapt_to_smart_server = BzrDirTestProviderAdapter( MemoryServer, SmartTCPServer_for_testing_v2_only, ReadonlySmartTCPServer_for_testing_v2_only, [(RemoteBzrDirFormat())], name_suffix='-v2') adapt_modules(test_bzrdir_implementations, adapt_to_smart_server, loader, smart_server_suite) result.addTests(smart_server_suite) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_branch_implementations = [ 'bzrlib.tests.branch_implementations.test_bound_sftp', 'bzrlib.tests.branch_implementations.test_branch', 'bzrlib.tests.branch_implementations.test_break_lock', 'bzrlib.tests.branch_implementations.test_check', 'bzrlib.tests.branch_implementations.test_create_checkout', 'bzrlib.tests.branch_implementations.test_commit', 'bzrlib.tests.branch_implementations.test_get_revision_id_to_revno_map', 'bzrlib.tests.branch_implementations.test_hooks', 'bzrlib.tests.branch_implementations.test_http', 'bzrlib.tests.branch_implementations.test_last_revision_info', 'bzrlib.tests.branch_implementations.test_locking', 'bzrlib.tests.branch_implementations.test_parent', 'bzrlib.tests.branch_implementations.test_permissions', 'bzrlib.tests.branch_implementations.test_pull', 'bzrlib.tests.branch_implementations.test_push', 'bzrlib.tests.branch_implementations.test_reconcile', 'bzrlib.tests.branch_implementations.test_revision_history', 'bzrlib.tests.branch_implementations.test_revision_id_to_revno', 'bzrlib.tests.branch_implementations.test_sprout', 'bzrlib.tests.branch_implementations.test_stacking', 'bzrlib.tests.branch_implementations.test_tags', 'bzrlib.tests.branch_implementations.test_uncommit', 'bzrlib.tests.branch_implementations.test_update', ] # Generate a list of branch formats and their associated bzrdir formats to # use. combinations = [(format, format._matchingbzrdir) for format in BranchFormat._formats.values() + _legacy_formats] adapter = BranchTestProviderAdapter( # None here will cause the default vfs transport server to be used. None, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, combinations) # add the tests for the sub modules tests.adapt_modules(test_branch_implementations, adapter, loader, result) # Add RemoteBranch tests, which need a special server. adapt_to_smart_server = BranchTestProviderAdapter( SmartTCPServer_for_testing, ReadonlySmartTCPServer_for_testing, [(RemoteBranchFormat(), RemoteBzrDirFormat())], MemoryServer, name_suffix='-default') tests.adapt_modules(test_branch_implementations, adapt_to_smart_server, loader, result) # Also add tests for RemoteBranch with HPSS protocol v2 (i.e. bzr <1.6) # server. adapt_to_smart_server = BranchTestProviderAdapter( SmartTCPServer_for_testing_v2_only, ReadonlySmartTCPServer_for_testing_v2_only, [(RemoteBranchFormat(), RemoteBzrDirFormat())], MemoryServer, name_suffix='-v2') tests.adapt_modules(test_branch_implementations, adapt_to_smart_server, loader, result) return result
def load_tests(basic_tests, module, loader): result = loader.suiteClass() # add the tests for this module result.addTests(basic_tests) test_branch_implementations = [ 'bzrlib.tests.branch_implementations.test_bound_sftp', 'bzrlib.tests.branch_implementations.test_branch', 'bzrlib.tests.branch_implementations.test_break_lock', 'bzrlib.tests.branch_implementations.test_check', 'bzrlib.tests.branch_implementations.test_create_checkout', 'bzrlib.tests.branch_implementations.test_commit', 'bzrlib.tests.branch_implementations.test_get_revision_id_to_revno_map', 'bzrlib.tests.branch_implementations.test_hooks', 'bzrlib.tests.branch_implementations.test_http', 'bzrlib.tests.branch_implementations.test_last_revision_info', 'bzrlib.tests.branch_implementations.test_locking', 'bzrlib.tests.branch_implementations.test_parent', 'bzrlib.tests.branch_implementations.test_permissions', 'bzrlib.tests.branch_implementations.test_pull', 'bzrlib.tests.branch_implementations.test_push', 'bzrlib.tests.branch_implementations.test_reconcile', 'bzrlib.tests.branch_implementations.test_revision_history', 'bzrlib.tests.branch_implementations.test_revision_id_to_revno', 'bzrlib.tests.branch_implementations.test_sprout', 'bzrlib.tests.branch_implementations.test_stacking', 'bzrlib.tests.branch_implementations.test_tags', 'bzrlib.tests.branch_implementations.test_uncommit', 'bzrlib.tests.branch_implementations.test_update', ] # Generate a list of branch formats and their associated bzrdir formats to # use. combinations = [ (format, format._matchingbzrdir) for format in BranchFormat._formats.values() + _legacy_formats ] adapter = BranchTestProviderAdapter( # None here will cause the default vfs transport server to be used. None, # None here will cause a readonly decorator to be created # by the TestCaseWithTransport.get_readonly_transport method. None, combinations) # add the tests for the sub modules tests.adapt_modules(test_branch_implementations, adapter, loader, result) # Add RemoteBranch tests, which need a special server. adapt_to_smart_server = BranchTestProviderAdapter( SmartTCPServer_for_testing, ReadonlySmartTCPServer_for_testing, [(RemoteBranchFormat(), RemoteBzrDirFormat())], MemoryServer, name_suffix='-default') tests.adapt_modules(test_branch_implementations, adapt_to_smart_server, loader, result) # Also add tests for RemoteBranch with HPSS protocol v2 (i.e. bzr <1.6) # server. adapt_to_smart_server = BranchTestProviderAdapter( SmartTCPServer_for_testing_v2_only, ReadonlySmartTCPServer_for_testing_v2_only, [(RemoteBranchFormat(), RemoteBzrDirFormat())], MemoryServer, name_suffix='-v2') tests.adapt_modules(test_branch_implementations, adapt_to_smart_server, loader, result) return result
def load_tests(basic_tests, module, loader): suite = loader.suiteClass() # add the tests for this module suite.addTests(basic_tests) testmod_names = [ 'bzrlib.tests.blackbox.test_add', 'bzrlib.tests.blackbox.test_added', 'bzrlib.tests.blackbox.test_alias', 'bzrlib.tests.blackbox.test_aliases', 'bzrlib.tests.blackbox.test_ancestry', 'bzrlib.tests.blackbox.test_annotate', 'bzrlib.tests.blackbox.test_branch', 'bzrlib.tests.blackbox.test_break_lock', 'bzrlib.tests.blackbox.test_breakin', 'bzrlib.tests.blackbox.test_bound_branches', 'bzrlib.tests.blackbox.test_bundle_info', 'bzrlib.tests.blackbox.test_cat', 'bzrlib.tests.blackbox.test_cat_revision', 'bzrlib.tests.blackbox.test_check', 'bzrlib.tests.blackbox.test_checkout', 'bzrlib.tests.blackbox.test_command_encoding', 'bzrlib.tests.blackbox.test_commit', 'bzrlib.tests.blackbox.test_conflicts', 'bzrlib.tests.blackbox.test_debug', 'bzrlib.tests.blackbox.test_diff', 'bzrlib.tests.blackbox.test_exceptions', 'bzrlib.tests.blackbox.test_export', 'bzrlib.tests.blackbox.test_find_merge_base', 'bzrlib.tests.blackbox.test_help', 'bzrlib.tests.blackbox.test_hooks', 'bzrlib.tests.blackbox.test_ignore', 'bzrlib.tests.blackbox.test_ignored', 'bzrlib.tests.blackbox.test_info', 'bzrlib.tests.blackbox.test_init', 'bzrlib.tests.blackbox.test_inventory', 'bzrlib.tests.blackbox.test_join', 'bzrlib.tests.blackbox.test_locale', 'bzrlib.tests.blackbox.test_log', 'bzrlib.tests.blackbox.test_logformats', 'bzrlib.tests.blackbox.test_ls', 'bzrlib.tests.blackbox.test_lsprof', 'bzrlib.tests.blackbox.test_merge', 'bzrlib.tests.blackbox.test_merge_directive', 'bzrlib.tests.blackbox.test_missing', 'bzrlib.tests.blackbox.test_modified', 'bzrlib.tests.blackbox.test_mv', 'bzrlib.tests.blackbox.test_nick', 'bzrlib.tests.blackbox.test_outside_wt', 'bzrlib.tests.blackbox.test_pack', 'bzrlib.tests.blackbox.test_pull', 'bzrlib.tests.blackbox.test_push', 'bzrlib.tests.blackbox.test_reconcile', 'bzrlib.tests.blackbox.test_reconfigure', 'bzrlib.tests.blackbox.test_remerge', 'bzrlib.tests.blackbox.test_remove', 'bzrlib.tests.blackbox.test_re_sign', 'bzrlib.tests.blackbox.test_remove_tree', 'bzrlib.tests.blackbox.test_revert', 'bzrlib.tests.blackbox.test_revno', 'bzrlib.tests.blackbox.test_revision_history', 'bzrlib.tests.blackbox.test_revision_info', 'bzrlib.tests.blackbox.test_selftest', 'bzrlib.tests.blackbox.test_send', 'bzrlib.tests.blackbox.test_serve', 'bzrlib.tests.blackbox.test_shared_repository', 'bzrlib.tests.blackbox.test_sign_my_commits', 'bzrlib.tests.blackbox.test_split', 'bzrlib.tests.blackbox.test_status', 'bzrlib.tests.blackbox.test_switch', 'bzrlib.tests.blackbox.test_tags', 'bzrlib.tests.blackbox.test_testament', 'bzrlib.tests.blackbox.test_too_much', 'bzrlib.tests.blackbox.test_uncommit', 'bzrlib.tests.blackbox.test_unknowns', 'bzrlib.tests.blackbox.test_update', 'bzrlib.tests.blackbox.test_upgrade', 'bzrlib.tests.blackbox.test_version', 'bzrlib.tests.blackbox.test_version_info', 'bzrlib.tests.blackbox.test_versioning', 'bzrlib.tests.blackbox.test_whoami', ] # add the tests for the sub modules suite.addTests(loader.loadTestsFromModuleNames(testmod_names)) test_encodings = [ 'bzrlib.tests.blackbox.test_non_ascii', ] adapter = EncodingTestAdapter() adapt_modules(test_encodings, adapter, loader, suite) return suite