Skip to content

Commit

Permalink
fix(test): fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Apr 17, 2024
1 parent f55e6bb commit 9bc3855
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions g2p/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from networkx.algorithms.dag import ancestors, descendants # type: ignore

from g2p import make_g2p
from g2p.exceptions import InvalidLanguageCode, NoPath
from g2p.exceptions import NoPath
from g2p.log import LOGGER
from g2p.mappings.langs import LANGS_NETWORK

Expand Down Expand Up @@ -116,11 +116,6 @@ def g2p(
raise HTTPException(
status_code=400, detail=f"No path from {in_lang} to {out_lang}"
)
except InvalidLanguageCode:
# Actually should never happen!
raise HTTPException(
status_code=404, detail="Unknown input or output language code"
)


@api.get(
Expand Down
2 changes: 2 additions & 0 deletions g2p/tests/test_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ async def test_sanity(self):
page = await browser.new_page()
await page.goto(f"http://127.0.0.1:{self.port}/docs")
await page.wait_for_timeout(self.timeout_delay)
await page.goto(f"http://127.0.0.1:{self.port}/static/swagger.json")
await page.wait_for_timeout(self.timeout_delay)
await page.goto(f"http://127.0.0.1:{self.port}")
await page.wait_for_timeout(self.timeout_delay)
input_el = page.locator("#input")
Expand Down

0 comments on commit 9bc3855

Please sign in to comment.