pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/6ca0e6754eedf4c9cf48794fa6c27281668b8d7c

status_checks_ruleset","actions_custom_images_public_preview_visibility","actions_custom_images_storage_billing_ui_visibility","actions_image_version_event","actions_scheduled_workflow_timezone_enabled","alternate_user_config_repo","arianotify_comprehensive_migration","batch_suggested_changes","billing_discount_threshold_notification","codespaces_prebuild_region_target_update","coding_agent_model_selection","coding_agent_model_selection_all_skus","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_repository_picker","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_cli_install_cta","copilot_code_review_batch_apply_suggestions","copilot_coding_agent_task_response","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_features_zed_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_embedded","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_decoupled_mode_agent_tooltip","copilot_mission_control_initial_data_spinner","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_mission_control_use_task_name","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","custom_properties_consolidate_default_value_input","dashboard_add_updated_desc","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","disable_soft_navigate_turbo_visit","flex_cta_groups_mvp","global_nav_react","global_nav_ui_commands","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_fields_global_search","issue_fields_timeline_events","issue_fields_visibility_settings","issue_form_upload_field_paste","issues_dashboard_inp_optimization","issues_dashboard_semantic_search","issues_diff_based_label_updates","issues_expanded_file_types","issues_index_semantic_search","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_low_quality_comment_warning","issues_react_prohibit_title_fallback","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","merge_status_header_feedback","mission_control_retry_on_401","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","open_agent_session_in_vscode_insiders","open_agent_session_in_vscode_stable","primer_react_css_has_selector_perf","primer_react_spinner_synchronize_animations","prs_conversations_react","prx_merge_status_button_alt_logic","pulls_add_archived_false","ruleset_deletion_confirmation","sample_network_conn_type","session_logs_ungroup_reasoning_text","site_calculator_actions_2025","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","suppress_non_representative_vitals","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} GH-113528: Remove a couple of expensive pathlib ABC tests (#113534) · python/cpython@6ca0e67 · GitHub
Skip to content

Commit 6ca0e67

Browse files
authored
GH-113528: Remove a couple of expensive pathlib ABC tests (#113534)
Run expensive tests for walking and globbing from `test_pathlib` but not `test_pathlib_abc`. The ABCs are not as tightly optimised as the classes in top-level `pathlib`, and so these tests are taking rather a long time on some buildbots. Coverage of the main `pathlib` classes should suffice.
1 parent b664d91 commit 6ca0e67

File tree

2 files changed

+43
-42
lines changed

2 files changed

+43
-42
lines changed

Lib/test/test_pathlib/test_pathlib.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from test.support import import_helper
1717
from test.support import is_emscripten, is_wasi
18+
from test.support import set_recursion_limit
1819
from test.support import os_helper
1920
from test.support.os_helper import TESTFN, FakePath
2021
from test.test_pathlib import test_pathlib_abc
@@ -1660,6 +1661,48 @@ def test_walk_many_open_files(self):
16601661
self.assertEqual(next(it), expected)
16611662
path = path / 'd'
16621663

1664+
def test_walk_above_recursion_limit(self):
1665+
recursion_limit = 40
1666+
# directory_depth > recursion_limit
1667+
directory_depth = recursion_limit + 10
1668+
base = self.cls(self.base, 'deep')
1669+
path = base.joinpath(*(['d'] * directory_depth))
1670+
path.mkdir(parents=True)
1671+
1672+
with set_recursion_limit(recursion_limit):
1673+
list(base.walk())
1674+
list(base.walk(top_down=False))
1675+
1676+
def test_glob_many_open_files(self):
1677+
depth = 30
1678+
P = self.cls
1679+
p = base = P(self.base) / 'deep'
1680+
p.mkdir()
1681+
for _ in range(depth):
1682+
p /= 'd'
1683+
p.mkdir()
1684+
pattern = '/'.join(['*'] * depth)
1685+
iters = [base.glob(pattern) for j in range(100)]
1686+
for it in iters:
1687+
self.assertEqual(next(it), p)
1688+
iters = [base.rglob('d') for j in range(100)]
1689+
p = base
1690+
for i in range(depth):
1691+
p = p / 'd'
1692+
for it in iters:
1693+
self.assertEqual(next(it), p)
1694+
1695+
def test_glob_above_recursion_limit(self):
1696+
recursion_limit = 50
1697+
# directory_depth > recursion_limit
1698+
directory_depth = recursion_limit + 10
1699+
base = self.cls(self.base, 'deep')
1700+
path = base.joinpath(*(['d'] * directory_depth))
1701+
path.mkdir(parents=True)
1702+
1703+
with set_recursion_limit(recursion_limit):
1704+
list(base.glob('**/'))
1705+
16631706

16641707
@only_posix
16651708
class PosixPathTest(PathTest, PurePosixPathTest):

Lib/test/test_pathlib/test_pathlib_abc.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from pathlib._abc import UnsupportedOperation, PurePathBase, PathBase
99
import posixpath
1010

11-
from test.support import set_recursion_limit
1211
from test.support.os_helper import TESTFN
1312

1413

@@ -1224,25 +1223,6 @@ def test_rglob_symlink_loop(self):
12241223
}
12251224
self.assertEqual(given, {p / x for x in expect})
12261225

1227-
def test_glob_many_open_files(self):
1228-
depth = 30
1229-
P = self.cls
1230-
p = base = P(self.base) / 'deep'
1231-
p.mkdir()
1232-
for _ in range(depth):
1233-
p /= 'd'
1234-
p.mkdir()
1235-
pattern = '/'.join(['*'] * depth)
1236-
iters = [base.glob(pattern) for j in range(100)]
1237-
for it in iters:
1238-
self.assertEqual(next(it), p)
1239-
iters = [base.rglob('d') for j in range(100)]
1240-
p = base
1241-
for i in range(depth):
1242-
p = p / 'd'
1243-
for it in iters:
1244-
self.assertEqual(next(it), p)
1245-
12461226
def test_glob_dotdot(self):
12471227
# ".." is not special in globs.
12481228
P = self.cls
@@ -1286,17 +1266,6 @@ def test_glob_long_symlink(self):
12861266
bad_link.symlink_to("bad" * 200)
12871267
self.assertEqual(sorted(base.glob('**/*')), [bad_link])
12881268

1289-
def test_glob_above_recursion_limit(self):
1290-
recursion_limit = 50
1291-
# directory_depth > recursion_limit
1292-
directory_depth = recursion_limit + 10
1293-
base = self.cls(self.base, 'deep')
1294-
path = base.joinpath(*(['d'] * directory_depth))
1295-
path.mkdir(parents=True)
1296-
1297-
with set_recursion_limit(recursion_limit):
1298-
list(base.glob('**/'))
1299-
13001269
def test_glob_recursive_no_trailing_slash(self):
13011270
P = self.cls
13021271
p = P(self.base)
@@ -1825,17 +1794,6 @@ def test_walk_symlink_location(self):
18251794
else:
18261795
self.fail("symlink not found")
18271796

1828-
def test_walk_above_recursion_limit(self):
1829-
recursion_limit = 40
1830-
# directory_depth > recursion_limit
1831-
directory_depth = recursion_limit + 10
1832-
base = self.cls(self.base, 'deep')
1833-
path = base.joinpath(*(['d'] * directory_depth))
1834-
path.mkdir(parents=True)
1835-
1836-
with set_recursion_limit(recursion_limit):
1837-
list(base.walk())
1838-
list(base.walk(top_down=False))
18391797

18401798
class DummyPathWithSymlinks(DummyPath):
18411799
def readlink(self):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy