Skip to content

Commit

Permalink
remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
davidovichmarcos committed Aug 16, 2024
1 parent 47a9eb5 commit 9337f0d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions nb-tests/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from dataclasses import dataclass
import ee
import papermill
from papermill.execute import PapermillExecutionError
import pytest

try:
Expand All @@ -25,9 +24,12 @@
"Seasonal Calculation.ipynb": "buffer source array is read-only",
"Tracking Data Gantt Chart.ipynb": "not a zip file",
}


class UnexecptedNotebookExecutionError(Exception):
pass


@dataclass
class Notebook:
path: pathlib.Path
Expand All @@ -38,12 +40,13 @@ class Notebook:
ALL_NOTEBOOKS = [
Notebook(
path=p,
raises=False if not p.name in KNOWN_ERRORS_REGEXES else True,
raises=False if p.name not in KNOWN_ERRORS_REGEXES else True,
raises_match=KNOWN_ERRORS_REGEXES.get(p.name),
)
for p in NB_DIR.rglob("*.ipynb")
]


@pytest.mark.parametrize(
"notebook",
ALL_NOTEBOOKS,
Expand All @@ -59,4 +62,4 @@ def test_notebooks(notebook: Notebook):
raise UnexecptedNotebookExecutionError(
f"{notebook.path.name=} not in {list(KNOWN_ERRORS_REGEXES)= } but execution errored. "
"This notebook is unexpectedly broken."
) from e
) from e

0 comments on commit 9337f0d

Please sign in to comment.