Layer tests
Technologicat opened this issue · 2 comments
As a follow-up to #5, especially if we go the @typed
route in #21, it's becoming important to layer the tests so that the lower levels (that other parts of unpythonic
rely on) are tested first, to make it easier to find the bug when something fundamental breaks.
The runtests.py
script executes the automated test modules in any given directory in lexicographical (a.k.a. "asciibetical"... nowadays maybe "unicodical"?) order, so this can be achieved by simply renaming the automated test files.
The tricky part is to figure out the proper ordering. As for the first layer, at least dynassign
and typecheck
, maybe also collections
(box
is used in other modules), should be part of that.
Hmm, maybe we can use pyan3's modvis.py
to find modules which have no outgoing edges, i.e. those that don't depend on anything else.
If there's at least a partial order in the dependency graph, that could point the way forward in a semi-automated way...
Layer 0: since our no-framework (cf. "NoSQL") unpythonic.test.fixtures
is programmable, we can test its lower-level functionality first (using plain asserts), before we run the rest of the tests.