Skip to content

Commit 1c53a11

Browse files
committed
bleak test for hardware only
Because the test requres use of onboard bluetooth modules for all OS, only run this locally when the TEST_HARDWARE env variable is set. Because the hardware test on macos was hanging due to waiting for bluetooth module to power on, also add a 5 min hang timeout
1 parent 3b3b1be commit 1c53a11

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[pytest]
22
asyncio_mode = auto
33
asyncio_default_fixture_loop_scope = function
4+
timeout = 300

test/test_bleak_v1_compatibility.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111
GATTAttributePermissions,
1212
)
1313

14-
hardware_only_on_linux = pytest.mark.skipif(
15-
(
16-
"sys.platform.lower() in ['linux', 'win32'] and "
17-
+ "os.environ.get('TEST_HARDWARE') is None"
18-
),
19-
allow_module_level=True,
14+
hardware_only = pytest.mark.skipif(
15+
"os.environ.get('TEST_HARDWARE') is None", allow_module_level=True
2016
)
2117

2218

23-
@hardware_only_on_linux
19+
@hardware_only
2420
class TestBleakV1Compatibility:
2521
"""Test compatibility with Bleak v1.1.1"""
2622

0 commit comments

Comments
 (0)