The contents of tests/unit/dcr/test_account.py are a bit all over the place. This reorders and regroups tests so they have the same structure as the code in account.py. Test data used by just one test class is placed inside that class, thereby further reducing the number of top-level objects.
This helps with finding tests and code folding, enables one to only run all tests for one class, and makes adding more tests easier.
This also reorders account.py itself a bit by putting all functions at the top, before the classes.
Unfortunately the diff is pretty much useless, understandable given the nature of the changes.
The contents of
tests/unit/dcr/test_account.py
are a bit all over the place. This reorders and regroups tests so they have the same structure as the code inaccount.py
. Test data used by just one test class is placed inside that class, thereby further reducing the number of top-level objects.This helps with finding tests and code folding, enables one to only run all tests for one class, and makes adding more tests easier.
This also reorders
account.py
itself a bit by putting all functions at the top, before the classes.Unfortunately the diff is pretty much useless, understandable given the nature of the changes.