check list large enough
@@ -37,4 +37,8 @@ def pytest_ignore_collect(path, config): # pylint: disable = unused-argument
relative_path = os.path.relpath(str(path), os.path.dirname(__file__))
relative_path_list = relative_path.split(os.path.sep)
- return relative_path_list[0] == "examples" and relative_path_list[1] == "labs"
+ return (
+ relative_path_list > 1
+ and relative_path_list[0] == "examples"
+ and relative_path_list[1] == "labs"
+ )
