mirror of
https://github.com/cmur2/python-bme680.git
synced 2024-11-14 18:56:19 +01:00
14 lines
370 B
Python
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
|