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

This commit is contained in:
Gaétan Lepage
2025-03-18 18:26:05 +01:00
committed by GitHub
@@ -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;