From 3f692cdfa381a0f8206030ac7c49136e474988c3 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Thu, 18 Feb 2021 10:44:43 +0100 Subject: [PATCH] tests --- .github/workflows/ci-testing.yml | 2 +- tests/examples/{test_examples.py => test_scripts.py} | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename tests/examples/{test_examples.py => test_scripts.py} (98%) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 37b2391445..15b2179657 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -71,7 +71,7 @@ jobs: uses: actions/cache@v2 with: path: data # This path is specific to Ubuntu - key: flash-datasets-${{ hashFiles('tests/examples/test_examples.py') }} + key: flash-datasets-${{ hashFiles('tests/examples/test_scripts.py') }} restore-keys: flash-datasets- - name: Tests diff --git a/tests/examples/test_examples.py b/tests/examples/test_scripts.py similarity index 98% rename from tests/examples/test_examples.py rename to tests/examples/test_scripts.py index 68ff6d27b6..cf4795387f 100644 --- a/tests/examples/test_examples.py +++ b/tests/examples/test_scripts.py @@ -46,7 +46,8 @@ def run_test(filepath): code, stdout, stderr = call_script(filepath) print(f"{filepath} STDOUT: {stdout}") print(f"{filepath} STDERR: {stderr}") - assert not code + if code: + raise RuntimeError(stderr) @pytest.mark.parametrize(