Commit 8ca29203 authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

python312Packages.swh-core: enable `systemd` tests

parent 2bf5c5a2
Loading
Loading
Loading
Loading
+17 −24
Original line number Diff line number Diff line
@@ -13,11 +13,14 @@
  tenacity,
  setuptools,
  setuptools-scm,
  aiohttp-utils,
  flask,
  hypothesis,
  iso8601,
  lzip,
  msgpack,
  postgresql,
  postgresqlTestHook,
  psycopg,
  pylzma,
  pytestCheckHook,
@@ -26,6 +29,7 @@
  pytest-postgresql,
  pytz,
  requests-mock,
  systemd,
  types-deprecated,
  types-psycopg2,
  types-pytz,
@@ -70,12 +74,15 @@ buildPythonPackage rec {
  __darwinAllowLocalNetworking = true;

  nativeCheckInputs = [
    aiohttp-utils
    flask
    hypothesis
    iso8601
    lzip
    msgpack
    psycopg
    postgresql
    postgresqlTestHook
    psycopg.optional-dependencies.pool
    pylzma
    pytestCheckHook
    pytest-aiohttp
@@ -83,6 +90,7 @@ buildPythonPackage rec {
    pytest-postgresql
    pytz
    requests-mock
    systemd
    types-deprecated
    types-psycopg2
    types-pytz
@@ -92,12 +100,7 @@ buildPythonPackage rec {
    pkgs.zstd
  ];

  disabledTests =
    [
      # ValueError: Unable to configure handler 'systemd'
      "test_logging_configure_from_yaml"
    ]
    ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
  disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
    # FileExistsError: [Errno 17] File exists:
    "test_uncompress_upper_archive_extension"
    # AssertionError: |500 - 632.1152460000121| not within 100
@@ -107,16 +110,6 @@ buildPythonPackage rec {
    "test_timed_no_metric"
  ];

  disabledTestPaths = [
    # ModuleNotFoundError: No module named 'aiohttp_utils'
    "swh/core/api/tests/test_async.py"
    "swh/core/api/tests/test_rpc_server_asynchronous.py"
    # ModuleNotFoundError: No module named 'systemd'
    "swh/core/tests/test_logger.py"
    # ModuleNotFoundError: No module named 'psycopg_pool'
    "swh/core/db/tests"
  ];

  meta = {
    description = "Low-level utilities and helpers used by almost all other modules in the stack";
    homepage = "https://gitlab.softwareheritage.org/swh/devel/swh-core";