decred / tinydecred

Python tools for Decred
ISC License
27 stars 14 forks source link

Reorder tests/unit/dcr/test_account.py #119

Closed teknico closed 4 years ago

teknico commented 4 years ago

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.