I more than agree, that had been my first attempt. But currently the GnuPG class is instantiated in a lot of places, currently not all of them with direct access to the config.

This override is for test purposes only. The constant pins GnuPG to a specific home folder, which is useful in a headless test context.