Closed cbm755 closed 5 years ago
:+1:, but why not test dir
?
An honest answer: test
scare me: its full of fid
, logging, and stuff like that.
@apjanke: I wonder if this testify package should:
testify
, with no clashes with core namespace.testify foo
will DTRT for any foo
.test.m
should be split into testify.m
and __test_file__m
.testify
to test
and merge into Octave.That's a good idea. Testify has gotten big enough, especially with the addition of the Forge package tester, that it should be able to peacefully coexist with (and possibly interact with) Octave's own testing. I'll make the name changes.
I renamed the functions in https://github.com/apjanke/octave-testify/commit/5defca4111fff6757440c67da23dab1c2bc7cde4 to avoid conflict with Octave's regular testing functions. They're now called test2
, runtests2
, and __run_test_suite2__
, creatively enough. (I couldn't call the test function "testify", because that seems to conflict with the +testify namespace, and I'd rather keep the namespace name.)
So, in terms of the main driver, I'd rather see both test2
and runtests2
hollowed out and have most of the actual testing logic moved into a testify.TestRunner
class, so it can be managed and configured in a more structured manner. Then test2
and runtests2
can mostly worry about translating the command style function signatures into appropriate object configurations.
Separate issue for renaming the top-level functions: #42. That part will go out in an 0.3.0 release that I'll make in the next couple days.
An honest answer: test scare me: its full of fid, logging, and stuff like that.
I refactored the code to make it easier to work with (#45). The new code is in test2_refactor
and runtests2_refactor
. Now we can make behavior changes wherever it makes the most sense, without avoiding test
.
This is in. runtests2_refactor
now recurses into subdirectories when you pass it a directory.
I made recursing the only behavior, not just the default, because I can't see a use case for not recursing. Octave source trees are typically not hierarchical once you get to a source directory. So the only reason you'd pass in a directory that is not an actual source directory is if you had source directories in its subdirs and you wanted to recurse. If I got this wrong, re-open this issue and I'll add a non-recursing option.
I'd like to see
runtests
be the main driver. A start would be having it recurse into directories by default.