Skip to content

Commit

Permalink
try normpath again with some debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo committed Oct 19, 2024
1 parent 541d0c4 commit f03f9a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
- run: pip install -r requirements.txt
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pytest -vv -We .
run: pytest -vv -rP -We .

9 changes: 6 additions & 3 deletions test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@


def _relative_path(absolute_path):
return os.path.relpath(absolute_path, _repo_path().absolute())
relpath = os.path.relpath(absolute_path, _repo_path().absolute())
normpath = os.path.normpath(relpath)
print(f"{relpath=}, {normpath=}")
return normpath


def _repo_path():
Expand All @@ -50,7 +53,7 @@ def _repo_path():
name="notebook_filename",
)
def _notebook_filename(request):
return os.path.normpath(request.param)
return request.param


def test_run_notebooks(notebook_filename, tmp_path):
Expand Down Expand Up @@ -135,7 +138,7 @@ def _colab_badge_markdown(absolute_path):


def test_first_cell_contains_three_badges(notebook_filename):
"""checks if all notebooks feature nbviewer, mybinder and Colab badges
"""checks if all notebooks feature Github preview, mybinder and Colab badges
(in the first cell)"""
with open(notebook_filename, encoding="utf8") as fp:
nb = nbformat.read(fp, nbformat.NO_CONVERT)
Expand Down

0 comments on commit f03f9a1

Please sign in to comment.