]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Updated for new testing structure
authorCefn Hoile <github.com@cefn.com>
Sun, 18 Feb 2018 20:57:28 +0000 (20:57 +0000)
committerCefn Hoile <github.com@cefn.com>
Sun, 18 Feb 2018 20:57:28 +0000 (20:57 +0000)
python/testing/implementation/micropython/digitalio.py

index adbabe0d2e48e2e858fc57835d7c74a64d4ba564..74bccce9f5920e9e56f66dddd0c3d7e7f262cd40 100644 (file)
@@ -3,20 +3,15 @@
     but which are not architecture-specific.
 """
 import unittest
     but which are not architecture-specific.
 """
 import unittest
-import agnostic
-import board
-
-if agnostic.board == "feather_m0_express":
-    LEDPIN = board.D13
-else:
-    raise NameError("No LED for {}".format(agnostic.platform))
+import digitalio
+from testing.board import default_pin
 
 class TestDigitalInOut(unittest.TestCase):
 
 
     def test_context_manager(self):
         """Deinitialisation is triggered by __exit__()"""
 
 class TestDigitalInOut(unittest.TestCase):
 
 
     def test_context_manager(self):
         """Deinitialisation is triggered by __exit__()"""
-        dio = create_pin()
+        dio = digitalio.DigitalInOut(default_pin)
         self.assertIsNotNone(dio._pin)
         with dio:
             pass
         self.assertIsNotNone(dio._pin)
         with dio:
             pass