Commit 9537bd50 authored by Artturin's avatar Artturin
Browse files

python312Packages.{proton-vpn-api-core,proton-vpn-network-manager}: Fix import tests

parent 99ceb335
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
  pytest-asyncio,
  requests,
  sentry-sdk,
  pyxdg,
  distro,
  pytestCheckHook,
  pytest-cov-stub,
@@ -40,6 +41,7 @@ buildPythonPackage rec {
    pynacl
    proton-core
    sentry-sdk
    pyxdg
  ];

  pythonImportsCheck = [
@@ -59,9 +61,11 @@ buildPythonPackage rec {
    pytest-cov-stub
  ];

  # Needed for `pythonImportsCheck`, `preCheck` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
  postInstall = ''
    # Needed for Permission denied: '/homeless-shelter'
    export HOME=$(mktemp -d)
    export XDG_RUNTIME_DIR=$(mktemp -d)
  '';

  disabledTests = [
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
  proton-vpn-local-agent,
  pycairo,
  pygobject3,
  pyxdg,
  pytest-asyncio,
  pytestCheckHook,
  pytest-cov-stub,
@@ -46,6 +47,7 @@ buildPythonPackage rec {
    proton-vpn-local-agent
    pycairo
    pygobject3
    pyxdg
  ];

  postPatch = ''
@@ -67,9 +69,11 @@ buildPythonPackage rec {
    pytest-asyncio
  ];

  # Needed for `pythonImportsCheck`, `preCheck` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
  preCheck = ''
    # Needed for Permission denied: '/homeless-shelter'
    export HOME=$(mktemp -d)
    export XDG_RUNTIME_DIR=$(mktemp -d)
  '';

  meta = {