[9.16] Skip test algorithm randomization in certain cases
This MR is the final missing piece for a functional 9.16 backport of #3503 (closed).
It fixes our nightly windows tests which lack python and also addresses an issue during a ./configure
phase.