Closed yamadapc closed 9 years ago
For the record, sandboxing with the vm
module doesn't seem like a viable option. There's no way to make the sandboxed environment support modules, unless we actually inject the parent processes' Module
instances into it, which doesn't seem like a very good idea.
This may be possible with some hacking and module system code study though.
Injecting the test runner into the code works and won't require the users to export all testable functions, but isn't very composable and will make it hard to make multiple files with
doctest
s to be executed smoothly with a single runner process. It's also subject to weird naming bugs.The current hack, of appending
assert
s into the source and then callingeval
on it is obviously completely unacceptable.This will take some time to figure out, since we'll have to explore available options.