Merge pull request #252488 from jbgosselin/python/magic-wormhole/fix-tests-darwin-sandbox

python3Packages.magic-wormhole{,-mailbox-server}: fix tests in darwin sandbox

authored by

asymmetric and committed by
GitHub
e87fc0b4 8c27922a

+32
+7
pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix
··· 1 1 { lib 2 + , stdenv 2 3 , buildPythonPackage 3 4 , fetchPypi 4 5 , fetchpatch ··· 47 48 mock 48 49 twisted 49 50 ]; 51 + 52 + # Fails in Darwin's sandbox 53 + postPatch = lib.optionalString stdenv.isDarwin '' 54 + echo 'LogRequests.skip = "Operation not permitted"' >> src/wormhole_mailbox_server/test/test_web.py 55 + echo 'WebSocketAPI.skip = "Operation not permitted"' >> src/wormhole_mailbox_server/test/test_web.py 56 + ''; 50 57 51 58 checkPhase = '' 52 59 trial -j$NIX_BUILD_CORES wormhole_mailbox_server
+25
pkgs/development/python-modules/magic-wormhole/default.nix
··· 56 56 disabledTests = [ 57 57 # Expected: (<class 'wormhole.errors.WrongPasswordError'>,) Got: Failure instance: Traceback (failure with no frames): <class 'wormhole.errors.LonelyError'>: 58 58 "test_welcome" 59 + ] ++ lib.optionals stdenv.isDarwin [ 60 + # These tests doesn't work within Darwin's sandbox 61 + "test_version" 62 + "test_text" 63 + "test_receiver" 64 + "test_sender" 65 + "test_sender_allocation" 66 + "test_text_wrong_password" 67 + "test_override" 68 + "test_allocate_port" 69 + "test_allocate_port_no_reuseaddr" 70 + "test_ignore_localhost_hint" 71 + "test_ignore_localhost_hint_orig" 72 + "test_keep_only_localhost_hint" 73 + "test_get_direct_hints" 74 + "test_listener" 75 + "test_success_direct" 76 + "test_direct" 77 + "test_relay" 78 + ]; 79 + 80 + disabledTestPaths = lib.optionals stdenv.isDarwin [ 81 + # These tests doesn't work within Darwin's sandbox 82 + "src/wormhole/test/test_xfer_util.py" 83 + "src/wormhole/test/test_wormhole.py" 59 84 ]; 60 85 61 86 postPatch = lib.optionalString stdenv.isLinux ''