diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 9172014..4d59d51 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -27,4 +27,4 @@ jobs: python -m pip install -r requirements-tests.txt --no-deps - name: Run tests run: | - python -m unittest discover . + python -W error -m unittest --verbose diff --git a/tests/test_examples.py b/tests/test_examples.py index af1bcab..987b871 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -11,6 +11,7 @@ import unittest import unittest.mock import urllib.parse +import warnings try: from dateutil.tz import tzlocal @@ -35,6 +36,16 @@ from examples.xkcd import ComicVersion, XKCDResource +def setUpModule() -> None: + """Code to run before any single test in the module is run.""" + warnings.filterwarnings("ignore", category=DeprecationWarning, module="botocore.auth") + + +def tearDownModule() -> None: + """Code to run after every single test in the module has been run.""" + warnings.filterwarnings("default", category=DeprecationWarning, module="botocore.auth") + + class MockedTextResponse: """ Represents a mocked requests.Response object containing a body.