]> Repositories - hackapet/Adafruit_Blinka.git/blobdiff - python/testing/__init__.py
Defined uart and spi hardware availability for esp8266 and stm32. Moved pin functiona...
[hackapet/Adafruit_Blinka.git] / python / testing / __init__.py
index 03231dab7f3738f8e43d6182a8651c7f9bd8f59f..5be50c18ee5651271ad8826e943026b2ec3dede1 100644 (file)
@@ -67,13 +67,16 @@ def test_module(module, runner=None):
     return runner.run(suite)
 
 def test_module_name(absolute, runner=None):
-    print("Testing {}".format(absolute))
-    module=__import__(absolute)
-    relatives = absolute.split(".")
-    if len(relatives) > 1:
-        for relative in relatives[1:]:
-            module = getattr(module, relative)
-    return test_module(module, runner)
+    try:
+        print("Suite begin: {}".format(absolute))
+        module=__import__(absolute)
+        relatives = absolute.split(".")
+        if len(relatives) > 1:
+            for relative in relatives[1:]:
+                module = getattr(module, relative)
+        return test_module(module, runner)
+    finally:
+        print("Suite end: {}".format(absolute))
 
 def test_interactive(*module_names):
     for module_name in module_names:
@@ -88,11 +91,16 @@ def test_prepare(casetype):
 
 
 def main():
-    import microcontroller.esp8266 # temporary workaround for stack recursion error
+    """
     moduleNames = ["testing.implementation.all.digitalio",]
     if agnostic.implementation == "micropython":
         moduleNames.extend([ "testing.implementation.micropython.digitalio",])
 
+    """
+    moduleNames = ["testing.implementation.all.bitbangio"]
+
     unittest.raiseException = True # terminates with stack information on userspace Exception
     unittest.raiseBaseException = True # terminates with stack information on system Exception
-    test_interactive(*moduleNames)
\ No newline at end of file
+    test_interactive(*moduleNames)
+
+gc.collect()
\ No newline at end of file