From b9cab239a7a17613ae15f01dfdef4dde345ea2bf Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 18 Jun 2023 17:36:54 +0200 Subject: [PATCH 1/2] runtests.sh: Fix variable quoting + add exec --- runtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtests.sh b/runtests.sh index 15fa202..f36f5cf 100755 --- a/runtests.sh +++ b/runtests.sh @@ -4,4 +4,4 @@ # If you are getting an INVOCATION ERROR for this script then there is # a good chance you are running on Windows. # You can and should use WSL for running tox on Windows when it calls bash scripts. -REQUESTS_CA_BUNDLE=`python -m pytest_httpbin.certs` pytest $* +REQUESTS_CA_BUNDLE=`python -m pytest_httpbin.certs` exec pytest "$@" From d66392a3fbc20dcb85442dcf987f2b7168948d8d Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 18 Jun 2023 16:59:13 +0200 Subject: [PATCH 2/2] main.yml: Enforce that use of @pytest.mark.online remains complete --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 54b1ef7..78290da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,5 +31,13 @@ jobs: - name: Run tests with tox run: tox + - name: Run offline tests with tox with no access to the Internet + run: | + # We're using unshare to take Internet access + # away from tox so that we'll notice whenever some new test + # is missing @pytest.mark.online decoration in the future + unshare --map-root-user --net -- \ + sh -c 'ip link set lo up; tox -- -m "not online"' + - name: Run coverage run: codecov