def test_broken_py_path_local_join_workaround_on_Windows(
self, tmpdir, initproj, monkeypatch):
# construct an absolute folder path for our src_root folder without the
# Windows drive indicator
src_root = tmpdir.join('spam')
src_root = _path_parts(src_root)
src_root[0] = ''
src_root = '/'.join(src_root)
# make sure tmpdir drive is the current one so the constructed src_root
# folder path gets interpreted correctly on Windows
monkeypatch.chdir(tmpdir)
# will throw an assertion error if the bug is not worked around
initproj('spam-666', src_root=src_root)
init_file = tmpdir.join('spam', 'spam', '__init__.py')
assert init_file.read_binary() == b"__version__ = '666'"
评论列表
文章目录