Unverified Commit 3f6e5ee4 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python312Packages.pytest-notebook: skip failing tests, modernize (#391008)

parents e73c4770 7ffa866f
Loading
Loading
Loading
Loading
+20 −11
Original line number Diff line number Diff line
@@ -2,19 +2,28 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  flit-core,

  # dependencies
  attrs,
  jsonschema,
  nbclient,
  nbdime,
  nbformat,

  # buildInputs
  pytest,

  # tests
  black,
  coverage,
  ipykernel,
  pytest-cov-stub,
  pytest-regressions,
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
@@ -29,7 +38,7 @@ buildPythonPackage rec {
    hash = "sha256-LoK0wb7rAbVbgyURCbSfckWvJDef3tPY+7V4YU1IBRU=";
  };

  nativeBuildInputs = [
  build-system = [
    flit-core
  ];

@@ -38,7 +47,7 @@ buildPythonPackage rec {
    "nbclient"
  ];

  propagatedBuildInputs = [
  dependencies = [
    attrs
    jsonschema
    nbclient
@@ -57,26 +66,26 @@ buildPythonPackage rec {
    pytest-cov-stub
    pytest-regressions
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  preCheck = ''
    export HOME="$TEMP"
  '';

  disabledTests = [
    # AssertionError: FILES DIFFER:
    "test_diff_to_string"

    # pytest_notebook.execution.CoverageError: An error occurred while executing coverage start-up
    # TypeError: expected str, bytes or os.PathLike object, not NoneType
    "test_execute_notebook_with_coverage"
    "test_regression_coverage"
    "test_collection"
    "test_setup_with_skip_meta"
    "test_run_fail"
    "test_run_pass_with_meta"

    # pytest_notebook.nb_regression.NBRegressionError
    "test_regression_regex_replace_pass"
  ];

  __darwinAllowLocalNetworking = true;

  meta = {
    changelog = "https://github.com/chrisjsewell/pytest-notebook/blob/${src.rev}/docs/source/changelog.md";
    changelog = "https://github.com/chrisjsewell/pytest-notebook/blob/${src.tag}/docs/source/changelog.md";
    description = "Pytest plugin for regression testing and regenerating Jupyter Notebooks";
    homepage = "https://github.com/chrisjsewell/pytest-notebook";
    license = lib.licenses.bsd3;