summaryrefslogtreecommitdiff
path: root/testenv/tests/__init__.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-13 21:43:52 +0300
committerDevaev Maxim <[email protected]>2020-09-13 21:43:52 +0300
commit5ed0c27f1f7201783d60e035ba26f35f62539a08 (patch)
treeb51e154595e9ce14499cd950d902c8dc41da49c8 /testenv/tests/__init__.py
parent0ad0d17528eeb52ba0dee78d5be440f092fed7d7 (diff)
removed rpi.gpio
Diffstat (limited to 'testenv/tests/__init__.py')
-rw-r--r--testenv/tests/__init__.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/testenv/tests/__init__.py b/testenv/tests/__init__.py
index d1faace6..1e91f7fa 100644
--- a/testenv/tests/__init__.py
+++ b/testenv/tests/__init__.py
@@ -18,42 +18,3 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
# #
# ========================================================================== #
-
-
-import sys
-
-from typing import Dict
-from typing import Optional
-
-import fake_rpi.RPi
-
-
-# =====
-class _GPIO(fake_rpi.RPi._GPIO): # pylint: disable=protected-access
- def __init__(self) -> None:
- super().__init__()
- self.__states: Dict[int, int] = {}
-
- @fake_rpi.RPi.printf
- def setup(self, channel: int, state: int, initial: int=0, pull_up_down: Optional[int]=None) -> None:
- _ = state # Makes linter happy
- _ = pull_up_down # Makes linter happy
- self.__states[int(channel)] = int(initial)
-
- @fake_rpi.RPi.printf
- def output(self, channel: int, state: int) -> None:
- self.__states[int(channel)] = int(state)
-
- @fake_rpi.RPi.printf
- def input(self, channel: int) -> int: # pylint: disable=arguments-differ
- return self.__states[int(channel)]
-
- @fake_rpi.RPi.printf
- def cleanup(self, channel: Optional[int]=None) -> None: # pylint: disable=arguments-differ
- _ = channel # Makes linter happy
- self.__states = {}
-
-
-# =====
-fake_rpi.RPi.GPIO = _GPIO()
-sys.modules["RPi"] = fake_rpi.RPi