One way to do it ... a very good way to do it, actually ... is to create one exportable "test harness" function that is capable of calling the local routines. This function is intended for use only by the testing framework.
The advantage of this technique, IMHO, is that it preserves the principle of something being "local," hence private to the module and not intended for public consumption ... or external testing. It documents, right there in the module, exactly how the private routines in the module are tested, and it does so without compromising their privacy.
|