The "manual" type-tests in #139 make it clear that repeating those tests for all scalar-types and flavors will become too much of a mess.
A pytest-based parametric testing framework script could solve this, by feeding generated code to mypy/bpr, and parsing the output. The startup cost of both mypy and bpr is rather big, so it should "buffer" the generated tests into one virtual .pyi file, instead. Mapping the typing-errors back to the original assertions requires some sort of deferral mechanism. Perhaps async/await could be exploited to achieve this, e.g. as assert await assert_assignable(_nt.To1D_intp, [42]) within a async test_to_intp() or something.
The "manual" type-tests in #139 make it clear that repeating those tests for all scalar-types and flavors will become too much of a mess.
A pytest-based parametric testing
frameworkscript could solve this, by feeding generated code to mypy/bpr, and parsing the output. The startup cost of both mypy and bpr is rather big, so it should "buffer" the generated tests into one virtual.pyifile, instead. Mapping the typing-errors back to the original assertions requires some sort of deferral mechanism. Perhapsasync/awaitcould be exploited to achieve this, e.g. asassert await assert_assignable(_nt.To1D_intp, [42])within aasync test_to_intp()or something.