Tests that importorskip('petab') skip when petab is installed but broken, so a broken petab passes CI as skipped tests
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
Línea de trabajo
Start by reading tests/conftest.py and the seven tutorial test modules updated for #1028, then locate the remaining pytest.importorskip('petab') calls across the 20 test files. Check that tests skip only when petab is absent and fail when an installed petab raises an import error; use the reproduction in the issue to verify the behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
153 calls of pytest.importorskip('petab') (or a petab. submodule) in 20 test files skip their tests when petab cannot be imported for any reason. pytest's importorskip turns a ModuleNotFoundError into a skip, and that includes one raised inside petab for a dependency that petab itself is missing. A petab that is installed but broken therefore does not fail any of these tests. They report as skipped, and some skip reasons name the wrong cause.
Reproduction. Put a stand-in petab on the path whose import fails on a missing dependency:
mkdir -p /tmp/fakepetab/petab
echo "import a_dependency_that_is_missing_xyz" > /tmp/fakepetab/petab/__init__.py
PYTHONPATH=/tmp/fakepetab .venv/bin/python -m pytest -o addopts='' -q -rs tests/test_linear_profiling.py tests/test_expression_objective.py
With the real petab 0.9.0 these two modules run 95 tests, all passing. With the broken one, both modules skip as a whole:
SKIPPED [1] tests/test_linear_profiling.py:39: could not import 'petab': No module named 'a_dependency_that_is_missing_xyz'
SKIPPED [1] tests/test_expression_objective.py:32: objective = expression needs the optional pybnf[petab] extra
The second reason says the extra is not installed. It is installed, and broken.
This matters most where petab breaks in an upgrade. petab has no pin beyond >=0.9,<1, and every CI leg except the dependency-floors one installs it, so a petab release that fails to import in PyBNF's environment would turn these suites into skips on every leg, with CI green.
#1028 added a petab marker that tests/conftest.py skips only when petab is absent (importlib.util.find_spec('petab') is None), and module-level skips in seven tutorial test modules that follow the same rule. A petab that is present but broken fails those tests. Converting the remaining importorskip('petab') calls to the marker, or to the same find_spec check, would give every petab test that behaviour.
- Lenguaje dominante
- Python
- Estrellas
- 25
- Forks
- 25
- Merge medio
- 4 h 5 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lanl/PyBNF
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
bug silent-incorrectness
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
Todos los issues de lanl/PyBNF
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
software-mansion-labs/Diplomat#20 ·
Los mantenedores suelen responder en 1 día
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPosiblemente ocupada @lijy91 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
libnativeapi/nativeapi#53 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
View Counts discarded due to field name mismatchPosiblemente ocupada @rsiva0400 la tomó hoy. Abiertosite-bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Model version publishes the new UK firm entity as a personPosiblemente ocupada @vahid-ahmadi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PolicyEngine/policyengine.py#764 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
spcl/HPCAgent-Bench#264 ·
Los mantenedores suelen responder en 1 día