Skip to content

Commit 0631303

Browse files
vstinnersrinivasreddy
authored andcommitted
pythongh-109959: Log the current directory in test_glob.test_selflink() (python#128122)
1 parent ee673ac commit 0631303

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_glob.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import unittest
77
import warnings
88

9+
from test import support
910
from test.support import is_wasi, Py_DEBUG
1011
from test.support.os_helper import (TESTFN, skip_unless_symlink,
1112
can_symlink, create_empty_file, change_cwd)
@@ -515,6 +516,12 @@ def test_selflink(self):
515516
os.makedirs(tempdir)
516517
self.addCleanup(shutil.rmtree, tempdir)
517518
with change_cwd(tempdir):
519+
if support.verbose:
520+
cwd = os.getcwd()
521+
print(f"cwd: {cwd} ({len(cwd)} chars)")
522+
cwdb = os.getcwdb()
523+
print(f"cwdb: {cwdb!r} ({len(cwdb)} bytes)")
524+
518525
os.makedirs('dir')
519526
create_empty_file(os.path.join('dir', 'file'))
520527
os.symlink(os.curdir, os.path.join('dir', 'link'))

0 commit comments

Comments
 (0)