1
0
mirror of https://github.com/cmur2/python-bme680.git synced 2025-01-10 05:00:14 +01:00
python-bme680/library/tests/test_setup.py

14 lines
370 B
Python
Raw Normal View History

2018-09-02 11:26:04 +01:00
import pytest
import bme680
2020-03-20 15:38:22 +00:00
def test_setup_not_present(smbus_notpresent):
2018-09-02 11:26:04 +01:00
"""Mock the adbsence of a BME680 and test initialisation."""
with pytest.raises(RuntimeError):
sensor = bme680.BME680() # noqa F841
2020-03-20 15:38:22 +00:00
def test_setup_mock_present(smbus):
2018-09-02 11:26:04 +01:00
"""Mock the presence of a BME680 and test initialisation."""
sensor = bme680.BME680() # noqa F841