1
0
mirror of https://github.com/cmur2/python-bme680.git synced 2024-11-01 02:56:15 +01:00
python-bme680/library/tests/test_setup.py

14 lines
370 B
Python
Raw Normal View History

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