File tree Expand file tree Collapse file tree
tests/integration/tutorials Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""
2- FInd and run all tutorials in the doc/tutorials directory
2+ Find and run all tutorials in the doc/tutorials directory
33"""
44import io
55import os
66import contextlib
77from importlib .machinery import SourceFileLoader
88from pathlib import Path
9- import platform
9+ import sys
1010
1111import pytest
1212import arcade
1616
1717
1818def find_tutorials ():
19- # Loop the directory of tutorials dirs
20- for dir in TUTORIAL_DIR .iterdir ():
21- if not dir .is_dir ():
19+ for path in TUTORIAL_DIR .rglob ("*.py" ):
20+ if path .stem .startswith ("_" ):
2221 continue
23-
24- print (dir )
25- # Find python files in each tutorial dir
26- for file in dir .glob ("*.py" ):
27- if file .stem .startswith ("_" ):
28- continue
29- # print("->", file)
30- yield file , file .stem in ALLOW_STDOUT
22+ yield path , path .stem in ALLOW_STDOUT
3123
3224
3325@pytest .mark .parametrize (
@@ -36,8 +28,8 @@ def find_tutorials():
3628)
3729def test_tutorials (window_proxy , file_path , allow_stdout ):
3830 """Run all tutorials"""
39- if "compute_shader" in str ( file_path ) and platform . system () == "darwin" :
40- raise pytest .skip (f "compute_shader tutorial not working on OS X " )
31+ if file_path . parent . name == "compute_shader" and sys . platform == "darwin" :
32+ raise pytest .skip ("compute_shader tutorial not working on MacOS " )
4133
4234 os .environ ["ARCADE_TEST" ] = "TRUE"
4335 stdout = io .StringIO ()
You can’t perform that action at this time.
0 commit comments