1515from bluetooth_sig .gatt .services .battery_service import BatteryService
1616from bluetooth_sig .gatt .services .environmental_sensing import EnvironmentalSensingService
1717from bluetooth_sig .gatt .uuid_registry import UuidRegistry
18+ from bluetooth_sig .registry .utils import find_bluetooth_sig_path
1819from bluetooth_sig .types .gatt_services import ServiceDiscoveryData
1920from bluetooth_sig .types .uuid import BluetoothUUID
20- from tests .conftest import ROOT_DIR
2121
2222
2323@pytest .fixture (scope = "session" )
@@ -191,7 +191,8 @@ def test_invalid_uuid_lookup(mock_uuid_registry: UuidRegistry) -> None:
191191@pytest .mark .packaging
192192def test_yaml_file_presence () -> None :
193193 """Test that required YAML files exist."""
194- base_path = ROOT_DIR / "bluetooth_sig" / "assigned_numbers" / "uuids"
194+ base_path = find_bluetooth_sig_path ()
195+ assert base_path is not None , "Cannot locate bluetooth_sig data path (submodule or installed package)"
195196
196197 assert (base_path / "service_uuids.yaml" ).exists (), "Service UUIDs YAML file missing"
197198 assert (base_path / "characteristic_uuids.yaml" ).exists (), "Characteristic UUIDs YAML file missing"
@@ -200,7 +201,8 @@ def test_yaml_file_presence() -> None:
200201@pytest .fixture (scope = "session" )
201202def yaml_data () -> dict [str , Any ]:
202203 """Load YAML data once per session for performance."""
203- base_path = ROOT_DIR / "bluetooth_sig" / "assigned_numbers" / "uuids"
204+ base_path = find_bluetooth_sig_path ()
205+ assert base_path is not None , "Cannot locate bluetooth_sig data path"
204206
205207 # Load service data
206208 service_file = base_path / "service_uuids.yaml"
0 commit comments