Skip to content

Commit

Permalink
CI: skip no_plot examples during tutorial tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Sep 5, 2024
1 parent 20286fb commit 5564f66
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_tutorials.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"""
Code to execute code examples notebooks in /docs/examples.
Code to execute code tutorial notebooks in /docs/examples/.
This will not be run through pytest but is meant to be run in a separate CI job.
This will not be run through pytest but is executed in a separate CI job.
A couple notes:
- the tutorials require a number of extra dependencies and data files to be present
check out the test-tutorials.yml workflow to see how this is set up.
- it's possible that any notebook that spawns another child process (e.g. the SWC I/O tutorial)
will hang indefinitely. This is because of the ominous "An attempt has been made to start a new
process before the current process has finished its bootstrapping phase." error which typically
Expand All @@ -17,7 +19,8 @@
from pathlib import Path

SKIP = [

"zzz_no_plot_01_nblast_flycircuit.py",
"zzz_no_plot_02_nblast_hemibrain.py"
]

if __name__ == "__main__":
Expand All @@ -37,7 +40,7 @@
# Set `capture_output=True` to see e.g. error messages.
p = subprocess.run(["python", str(file)], check=True, capture_output=True, timeout=600, cwd=file.parent)
except subprocess.CalledProcessError as e:
print("Failed.")
print("Failed!")
print(e.stdout.decode())
print(e.stderr.decode())
raise
Expand Down

0 comments on commit 5564f66

Please sign in to comment.