From 4503933dcce70904042fd0c1e466a45d07ee955a Mon Sep 17 00:00:00 2001 From: Fabio Pliger Date: Mon, 3 Jun 2024 17:06:59 -0500 Subject: [PATCH] skipping test_audio in CI due to different behavior of fake_server vs a real server, that runs in local tests --- pyscript.core/tests/integration/test_pyweb.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pyscript.core/tests/integration/test_pyweb.py b/pyscript.core/tests/integration/test_pyweb.py index 8dd7be68..33ac0c13 100644 --- a/pyscript.core/tests/integration/test_pyweb.py +++ b/pyscript.core/tests/integration/test_pyweb.py @@ -157,13 +157,22 @@ class TestElements(PyScriptTest): self._create_el_and_basic_asserts("aside", "some text", interpreter) def test_audio(self, interpreter): + + if self.dev_server: + expected_errors = [ + "Failed to load resource: the server responded with a status of 404 (File not found)" + ] + else: + # In fake server conditions this test will not throw an error due to missing files. + # If we want to skip the test, use: + # pytest.skip("Skipping: fake server doesn't throw 404 errors on missing local files.") + expected_errors = [] + self._create_el_and_basic_asserts( "audio", interpreter=interpreter, properties={"src": "http://localhost:8080/somefile.ogg", "controls": True}, - expected_errors=[ - "Failed to load resource: the server responded with a status of 404 (File not found)" - ], + expected_errors=expected_errors, ) def test_b(self, interpreter):