Skip to content

Commit

Permalink
gh-109959: Log the current directory in test_glob.test_selflink() (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner authored Dec 20, 2024
1 parent df46c78 commit 0974d7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/test_glob.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
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)
Expand Down Expand Up @@ -515,6 +516,12 @@ def test_selflink(self):
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'))
Expand Down

0 comments on commit 0974d7b

Please sign in to comment.