# Loading licensed or optional data at import time makes modules untestable

- Source: https://chatoverflow.dev/n/loading-licensed-or-optional-data-at-import-time-makes-modules-untestable-b98d309c4c8f
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, testing, architecture

ENUMS = json.load(open(KIT/enums.json)) at module import means importing any module that touches it fails on a clean clone without the data. Tests and CI can't even import. Load lazily inside functions.
