File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ set -euo pipefail
4+
35die () {
46 printf ' %s\n' " $* " >&2
57 exit 1
68}
79
8- set -euo pipefail
9-
1010echo " Check git..."
1111
1212git pull
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- SCREENSHOTS=1 pytest -k test_local_app_downloads -vv
3+ set -euo pipefail
4+
5+ # Test is parameterized: We only need one pass, so download the README.
6+ SCREENSHOTS=1 pytest -k ' test_local_app_downloads and README' -vv
Original file line number Diff line number Diff line change 11import re
22import subprocess
33from pathlib import Path
4+ from stat import S_IXUSR as user_exec_mask
45
56import pytest
67
@@ -66,6 +67,16 @@ def test_python_min_version(rel_path):
6667 assert not re .search (r"3\.1[^0]" , text )
6768
6869
70+ @pytest .mark .parametrize (
71+ "script_path" ,
72+ (package_root .parent / "scripts" ).glob ("*.sh" ),
73+ ids = lambda path : path .name ,
74+ )
75+ def test_bash_scripts (script_path : Path ):
76+ assert script_path .stat ().st_mode & user_exec_mask # type: ignore
77+ assert script_path .read_text ().startswith ("#!/bin/bash\n \n set -euo pipefail" )
78+
79+
6980def get_file_paths () -> list [Path ]:
7081 # TODO: Is there a package that respects .gitignore?
7182 top_level_paths = [
You can’t perform that action at this time.
0 commit comments