Tweaks, fixes, linting and docs

This commit is contained in:
Phil Howard
2020-08-27 12:26:08 +01:00
parent de90e2289c
commit 3123e27939
14 changed files with 229 additions and 217 deletions

View File

@@ -70,12 +70,3 @@ def atexit():
sys.modules['atexit'] = atexit
yield atexit
del sys.modules['atexit']
@pytest.fixture(scope='function', autouse=False)
def numpy():
"""Mock numpy module."""
numpy = mock.MagicMock()
sys.modules['numpy'] = numpy
yield numpy
del sys.modules['numpy']

View File

@@ -9,7 +9,7 @@ def test_moisture_setup(GPIO, smbus):
def test_moisture_read_all(GPIO, smbus):
from grow import moisture
moisture._is_setup = False
result = moisture.read_all()
assert type(result(1)) == float