This is not a question specific to defaultdict but in general philosophy or logic behind placing code in test files.
I would like to know reason behind placing the d