mirror of
https://github.com/mvt-project/mvt.git
synced 2026-09-11 12:18:57 +02:00
The tests read the settings file of whoever runs them, and importing mvt.common.config writes it back. On a machine whose config.yaml sets NETWORK_ACCESS_ALLOWED to false, the plugin update and URL batch tests fail before their mocked requests are reached, and every Command run in the suite parses the indicators downloaded on that machine, which made the suite take minutes instead of seconds. MVT_CONFIG_FOLDER and MVT_DATA_FOLDER in the environment now relocate the settings file and the downloaded indicators with their update-check state. The test conftest points both at a throwaway folder before any mvt module is imported, and removes it at exit. Subprocesses started by the tests inherit the variables; the isolated interpreter helper already gives them a temporary home. On the machine that prompted this the suite goes from 6 failures in six minutes to none in seven seconds, and config.yaml is left alone.