From 209bedb2b89b3d5e615a49831c5b55a839244c7a Mon Sep 17 00:00:00 2001 From: Itamar Oren Date: Sun, 6 Apr 2025 19:23:22 -0700 Subject: [PATCH] Avoid slow test_expanduser_pwd2 in test_posixpath for huge pwd.getpwall() On systems where `pwd.getpwall()` can return lots of entries, this test can end up being very slow, for no obvious benefit. --- Lib/test/test_posixpath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 43e4fbc610e5f7..db17611f7f179d 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -359,7 +359,7 @@ def test_expanduser_pwd(self): "no home directory on VxWorks") def test_expanduser_pwd2(self): pwd = import_helper.import_module('pwd') - for all_entry in get_attribute(pwd, 'getpwall')(): + for all_entry in get_attribute(pwd, 'getpwall')()[:10]: name = all_entry.pw_name # gh-121200: pw_dir can be different between getpwall() and