Technologicat / unpythonic

Supercharge your Python with parts of Lisp and Haskell.
Other
91 stars 3 forks source link

Layer tests #69

Open Technologicat opened 4 years ago

Technologicat commented 4 years ago

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.

Technologicat commented 4 years ago

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...

Technologicat commented 4 years ago

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.