set_tests_properties ENVIRONMENT ignored

In my CMakeLists.txt, I define a Python unit test like this:

ADD_TEST(NAME foo
   COMMAND "${python}" -B -m unittest discover -v
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

For that to work, a related .pyd must be found from the binary tree. Thus, I specify PYTHONPATH and another needed environment variable, like this:

SET_TESTS_PROPERTIES(foo PROPERTIES
   ENVIRONMENT "PYTHONPATH=dir1\;dir2;EVAR=false"
)

The Python unit tests run, but the PYTHONPATH doesn’t reflect what I set. I tried forward and backslashes in the path, just in case those mattered.

FYI, I’m using the “Visual Studio 15 2017” generator.

What am I missing?

Building with makefiles for GCC, the CTestTestfile.cmake in the Python extension module directory, which is where the aforementioned ADD_TEST() appears, I see the variables defined:

set_tests_properties(my_tests PROPERTIES  ENVIRONMENT "PYTHONPATH=dir1:dir2;EVAR=false" WORKING_DIRECTORY "project source dir")

Unfortunately, the tests still fail because the import of the extension module (.so) fails, despite the .so being in dir1. (Before you ask, the .so is created before the tests run and the tests fail repeatedly well after the creation of the .so.)