import os
import sys
import unittest


def suite():
    MODULE_DIR = os.path.join(os.path.dirname(__file__), '..')
    MODULE_DIR = os.path.abspath(MODULE_DIR)
    sys.path.insert(0, MODULE_DIR)
    sys.path.insert(0, os.path.dirname(__file__))

    SUB_UNITS = os.path.dirname(__file__)
    SUB_UNITS = os.listdir(SUB_UNITS)
    SUB_UNITS = [
        filename[:-3]
        for filename in SUB_UNITS
        if filename.startswith('test_')
    ]

    os.chdir(os.path.dirname(__file__))
    loader = unittest.TestLoader()
    return loader.loadTestsFromNames(SUB_UNITS)

@@ -1,94 +1,139 @@
-import os%0Aimport sys%0Aimport unittest%0A%0A%0Adef suite():%0A    MODULE_DIR = os.path.join(os.path.
+from os import walk, chdir%0Afrom os.path import join, dirname, splitext, abspath, relpath%0Aimport sys%0Aimport unittest%0A%0AMODULE_DIR = join(
 dirn
@@ -153,20 +153,16 @@
 , '..')%0A
-    
 MODULE_D
@@ -166,24 +166,16 @@
 E_DIR = 
-os.path.
 abspath(
@@ -178,32 +178,339 @@
 ath(MODULE_DIR)%0A
+%0A%0Adef walker(opath='.'):%0A    for path, folders, files in walk(opath):%0A        for filename in files:%0A            if filename.startswith('test_') and filename.endswith('.py'):%0A                rpath = relpath(path, opath)%0A%0A                yield (rpath + '.' + splitext(filename)%5B0%5D).strip('.')%0A%0A%0Adef suite():%0A
     sys.path.ins
@@ -551,24 +551,16 @@
 sert(0, 
-os.path.
 dirname(
@@ -587,24 +587,16 @@
 UNITS = 
-os.path.
 dirname(
@@ -625,172 +625,37 @@
 S = 
-os.listdir(SUB_UNITS)%0A    SUB_UNITS = %5B%0A        filename%5B:-3%5D%0A        for filename in SUB_UNITS%0A        if filename.startswith('test_')%0A    %5D
+walker(SUB_UNITS)
 %0A%0A    
-os.
 chdir(
-os.path.
 dirn
@@ -673,20 +673,19 @@
 _))%0A
+%0A
     
-loader =
+return
  uni
@@ -706,26 +706,8 @@
 er()
-%0A    return loader
 .loa

Rework for tests in subdirectories