Closed whimboo closed 2 years ago
The method LocalPath.make_numbered_dir() doesn't correctly handle unicode strings:
LocalPath.make_numbered_dir()
def test_tmpdir_unicode(tmpdir_factory): tmpdir = tmpdir_factory.mktemp(u'Хенрик')
It fails with:
src = str(udir) E UnicodeEncodeError: 'ascii' codec can't encode characters in position 85-90: ordinal not in range(128)
Using fspath(udir) fixes it: https://github.com/pytest-dev/py/blob/master/py/_path/local.py#L944
fspath(udir)
closing as wontfix, pytest has tmp_path now
The method
LocalPath.make_numbered_dir()
doesn't correctly handle unicode strings:It fails with:
Using
fspath(udir)
fixes it: https://github.com/pytest-dev/py/blob/master/py/_path/local.py#L944