In theory this is already tested by setting the scratch dir to scratch_ ₿🧪_ in the CI:
However, this doesn't cover everything, because on Linux, the build dir will contain symlinks to the Python functional tests, which will drop the space when they are resolved. So the subprocess.h may not see spaces in the command.
In theory, this can be fixed by moving the CI root dir to something with spaces, but this breaks other stuff (like depends).
So, only test subprocess.h handling of paths with spaces on Windows, which creates copies instead of symlinks to Python scripts.