If you really need that you could use the import expression to mixin your unittests. But you should really put the unittests next to the tested code. A good editor could fold it anyway.