summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-12-20 12:37:20 (GMT)
committerGitHub <noreply@github.com>2024-12-20 12:37:20 (GMT)
commit0974d7bb866062ed4aaa40f705d6cc4c294d99f1 (patch)
treeec61654c9873e99c7959c55ea082536c32ad0dd9 /Lib
parentdf46c780febab667ee01264ae32c4e866cecd911 (diff)
downloadcpython-0974d7bb866062ed4aaa40f705d6cc4c294d99f1.zip
cpython-0974d7bb866062ed4aaa40f705d6cc4c294d99f1.tar.gz
cpython-0974d7bb866062ed4aaa40f705d6cc4c294d99f1.tar.bz2
gh-109959: Log the current directory in test_glob.test_selflink() (#128122)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_glob.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_glob.py b/Lib/test/test_glob.py
index b72640b..00187a3 100644
--- a/Lib/test/test_glob.py
+++ b/Lib/test/test_glob.py
@@ -6,6 +6,7 @@ import sys
import unittest
import warnings
+from test import support
from test.support import is_wasi, Py_DEBUG
from test.support.os_helper import (TESTFN, skip_unless_symlink,
can_symlink, create_empty_file, change_cwd)
@@ -515,6 +516,12 @@ class SymlinkLoopGlobTests(unittest.TestCase):
os.makedirs(tempdir)
self.addCleanup(shutil.rmtree, tempdir)
with change_cwd(tempdir):
+ if support.verbose:
+ cwd = os.getcwd()
+ print(f"cwd: {cwd} ({len(cwd)} chars)")
+ cwdb = os.getcwdb()
+ print(f"cwdb: {cwdb!r} ({len(cwdb)} bytes)")
+
os.makedirs('dir')
create_empty_file(os.path.join('dir', 'file'))
os.symlink(os.curdir, os.path.join('dir', 'link'))