1
0
mirror of https://github.com/cmur2/python-bme680.git synced 2024-12-23 08:54:27 +01:00
python-bme680/library/tests/test_setup.py
2020-03-20 15:38:22 +00:00

14 lines
370 B
Python

import pytest
import bme680
def test_setup_not_present(smbus_notpresent):
"""Mock the adbsence of a BME680 and test initialisation."""
with pytest.raises(RuntimeError):
sensor = bme680.BME680() # noqa F841
def test_setup_mock_present(smbus):
"""Mock the presence of a BME680 and test initialisation."""
sensor = bme680.BME680() # noqa F841