The problem seems to be ConEmu setting environment variables before executing the test process. The test passes when run in Windows CMD.