Files
nixpkgs/pkgs/development/python-modules/bumble/default.nix
Sandro Jäckel 5e16997e94 python3Packages.bumble: disable flaky test
=================================== FAILURES ===================================
_______________ test_resync_fails_when_the_reset_is_not_answered _______________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7ffff2f8ff50>

    @requires_pty
    async def test_resync_fails_when_the_reset_is_not_answered(monkeypatch):
        monkeypatch.setattr(serial, 'RESYNC_MAX_TIME', 0.3)
        fake_controller = FakeSerialController(honors_reset=False)
        try:
            loop = asyncio.get_running_loop()
            started_at = loop.time()
            with pytest.raises(common.TransportInitError) as error:
                await asyncio.wait_for(
                    serial.open_serial_transport(f'{fake_controller.path},resync'), 5
                )
            assert loop.time() - started_at >= 0.3
            assert 'did not answer' in str(error.value)

            assert fake_controller.received == bytes(serial.RESYNC_PADDING_SIZE) + HCI_RESET
            await asyncio.sleep(0.1)
>           assert fake_controller.open_count() == 1
E           assert 4 == 1
E            +  where 4 = open_count()
E            +    where open_count = <tests.transport.transport_test.FakeSerialController object at 0x7ffff2cc44d0>.open_count

tests/transport/transport_test.py:515: AssertionError
2026-11-07 03:47:22 +01:00

98 lines
1.7 KiB
Nix

{
aiohttp,
appdirs,
buildPythonPackage,
click,
cryptography,
fetchFromGitHub,
grpcio,
humanize,
lib,
libusb-package,
libusb1,
platformdirs,
prettytable,
prompt-toolkit,
protobuf,
pyee,
pyserial,
pyserial-asyncio,
pytest-asyncio,
pytestCheckHook,
pyusb,
setuptools,
setuptools-scm,
tomli,
websockets,
}:
buildPythonPackage (finalAttrs: {
pname = "bumble";
version = "0.0.236";
pyproject = true;
src = fetchFromGitHub {
owner = "google";
repo = "bumble";
tag = "v${finalAttrs.version}";
hash = "sha256-CHCzR22gxiWSePOlxwmuCo38t9FwYnz9h7MghnIHvsM=";
};
build-system = [
setuptools
setuptools-scm
];
pythonRelaxDeps = [
"libusb-package"
"tomli"
];
dependencies = [
aiohttp
appdirs
click
cryptography
grpcio
humanize
libusb-package
libusb1
platformdirs
prettytable
prompt-toolkit
protobuf
pyee
pyserial
pyserial-asyncio
pyusb
tomli
websockets
];
pythonImportsCheck = [ "bumble" ];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pytestFlags = [ "--asyncio-mode=auto" ];
__darwinAllowLocalNetworking = true;
disabledTests = [
# tests require networking
"test_android_netsim_connection"
"test_open_transport_with_metadata"
# flaky on higher core counts
"test_resync_fails_when_the_reset_is_not_answered"
];
meta = {
changelog = "https://github.com/google/bumble/releases/tag/${finalAttrs.src.tag}";
description = "Bluetooth Stack for Apps, Emulation, Test and Experimentation";
homepage = "https://github.com/google/bumble";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.dotlambda ];
};
})