Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RootShinobi committed Jan 18, 2024
1 parent 68554f5 commit 0321768
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
if: "env.IS_PYPY == 'false'"
run: |
ruff check --output-format=github aiogram_i18n tests
black --check --diff aiogram_i18n tests examples
# black --check --diff aiogram_i18n tests examples

- name: Run tests
run: pytest --cov=aiogram_i18n --cov-config .coveragerc --cov-report=xml
Expand Down
4 changes: 2 additions & 2 deletions tests/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ async def test_file_not_found_exception(
],
)
@pytest.mark.asyncio
@pytest.mark.xfail(raises=NoLocalesFoundError)
async def test_no_locales_found_error(
i18n: BaseCore[Any], locales_output: Path, code_sample_dir: Path
):
Expand All @@ -118,4 +117,5 @@ async def test_no_locales_found_error(
fkp.run(create_missing_dirs=True)

assert i18n.available_locales == ()
await i18n.startup()
with pytest.raises(NoLocalesFoundError):
await i18n.startup()
4 changes: 2 additions & 2 deletions tests/test_multiple_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ async def test_file_not_found_exception(multiple_locales_output: Path, code_samp
],
)
@pytest.mark.asyncio
@pytest.mark.xfail(raises=(UnknownLocaleError, TypeError))
async def test_unknown_locale_error(
i18n: BaseCore[Any], no_locales_output: Path, code_sample_dir: Path
):
Expand All @@ -235,4 +234,5 @@ async def test_unknown_locale_error(
fkp.run(create_missing_dirs=True)

assert i18n.available_locales == ()
await i18n.startup()
with pytest.raises((TypeError, UnknownLocaleError)): # type: ignore
await i18n.startup()

0 comments on commit 0321768

Please sign in to comment.