Description: fix build directory for test runner
 Hardcode Python 3 build directory in the test runner to the one that Debian
 package uses.
Author: Jakub Wilk <jwilk@debian.org>
Forwarded: not-needed
Last-Update: 2013-09-18

--- a/tests/run.py
+++ b/tests/run.py
@@ -21,17 +21,17 @@
     # tox installs the sphinx package, no need for sys.path.insert
 else:
     newroot = path.join(testroot, path.pardir, 'build')
-    newroot = path.join(newroot, listdir(newroot)[0], 'tests')
+    newroot = path.join(newroot, 'py%d' % sys.version_info[0], 'tests')
 
 shutil.rmtree(newroot, ignore_errors=True)
 
 if sys.version_info >= (3, 0):
-    print('Copying and converting sources to build/lib/tests...')
+    print('Copying and converting sources to build/py3/tests...')
     from distutils.util import copydir_run_2to3
     copydir_run_2to3(testroot, newroot)
 else:
     # just copying test directory to parallel testing
-    print('Copying sources to build/lib/tests...')
+    print('Copying sources to build/py2/tests...')
     shutil.copytree(testroot, newroot)
 
 # always test the sphinx package from build/lib/
