Introduce unit tests (#248)

* Proof-of-concept: unittests

* Add pytest-asyncio dep

* Import Body from stream

* Add test for allow_extra_tracks

* Cleanup decorators

* add test to linting

* fix ruff issues

* Run formatter

* fix

* Dont test every python version

---------

Co-authored-by: Marcus Valtonen Örnhag <marcus.valtonen.ornhag@ericsson.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
This commit is contained in:
Marcus Valtonen Örnhag
2025-04-07 23:35:25 +02:00
committed by GitHub
parent 0767030997
commit 2331079c0f
8 changed files with 1246 additions and 898 deletions

View File

@@ -73,6 +73,11 @@
"error",
`Too many concurrent connections. Please try again later!`,
);
} else if (
msg.status === "failed" &&
msg.meta?.error === "connection_already_exists"
) {
gradio.dispatch("error", "Connection already exists");
} else {
gradio.dispatch("error", "Unexpected server error");
}