Unverified Commit dabc46a0 authored by K900's avatar K900 Committed by GitHub
Browse files

treewide: paperless-ngx fixes (#436108)

parents f55cb76c 413b9e7e
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -152,15 +152,6 @@ python.pkgs.buildPythonApplication rec {

  inherit version src;

  # Manual partial backport of:
  # - https://github.com/paperless-ngx/paperless-ngx/commit/9889c59d3daa8f4ac8ec2400c00ddc36a7ca63c9
  # - https://github.com/paperless-ngx/paperless-ngx/pull/10538
  # Fixes build with latest dependency versions.
  # FIXME: remove in next update
  patches = [
    ./dep-updates.patch
  ];

  postPatch = ''
    # pytest-xdist with to many threads makes the tests flaky
    if (( $NIX_BUILD_CORES > 3)); then
+14 −10
Original line number Diff line number Diff line
@@ -56,19 +56,23 @@ buildPythonPackage rec {
  # redisTestHook does not work on darwin
  doCheck = !stdenv.hostPlatform.isDarwin;

  # disable broken pinning test
  preCheck = ''
    substituteInPlace cachalot/tests/read.py \
      --replace-fail \
        "def test_explain(" \
        "def _test_explain("
    export DJANGO_SETTINGS_MODULE=settings
  '';

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} runtests.py
    runHook postCheck
  '';
  pytestFlags = [
    "-o python_files=*.py"
    "-o collect_imported_tests=false"
    "cachalot/tests"
    "cachalot/admin_tests"
  ];

  disabledTests = [
    # relies on specific EXPLAIN output format from sqlite, which is not stable
    "test_explain"
    # broken on django-debug-toolbar 6.0
    "test_rendering"
  ];

  meta = with lib; {
    description = "No effort, no worry, maximum performance";