Move assignment of srcdir to the right place

This commit is contained in:
Andy Neebel 2017-06-17 07:49:45 -05:00
parent e51b3c41ea
commit bcea04a2f7

View File

@ -34,11 +34,11 @@ def nonascii_srcdir(request, rootdir, sphinx_test_tempdir):
basedir = sphinx_test_tempdir / request.node.originalname basedir = sphinx_test_tempdir / request.node.originalname
# Windows with versions prior to 3.2 (I think) doesn't support unicode on system path # Windows with versions prior to 3.2 (I think) doesn't support unicode on system path
# so we force a non-unicode path in that case # so we force a non-unicode path in that case
if sys.platform == "win32": if sys.platform == "win32" and \
if not (sys.version_info.major >= 3 and sys.version_info.minor >= 2): not (sys.version_info.major >= 3 and sys.version_info.minor >= 2):
return basedir / 'all' return basedir / 'all'
srcdir = basedir / test_name
try: try:
srcdir = basedir / test_name
if not srcdir.exists(): if not srcdir.exists():
(rootdir / 'test-root').copytree(srcdir) (rootdir / 'test-root').copytree(srcdir)
except UnicodeEncodeError: except UnicodeEncodeError: