Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4bc1ca9

Browse files
authored
Merge pull request #11713 from anntzer/nbaggtestcwd
Don't assume cwd in test_ipynb.
2 parents bc39b1c + b650c67 commit 4bc1ca9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/tests/test_backend_nbagg.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
2-
import os
1+
from pathlib import Path
32
import subprocess
43
import tempfile
4+
55
import pytest
66

77
nbformat = pytest.importorskip('nbformat')
@@ -29,5 +29,6 @@ def _notebook_run(nb_file):
2929

3030

3131
def test_ipynb():
32-
nb, errors = _notebook_run('lib/matplotlib/tests/test_nbagg_01.ipynb')
32+
nb, errors = _notebook_run(
33+
str(Path(__file__).parent / 'test_nbagg_01.ipynb'))
3334
assert errors == []

0 commit comments

Comments
 (0)