-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from MountainGod2/dev
tests: updated and expanded test coverage
- Loading branch information
Showing
3 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# ruff: noqa: S101 | ||
"""Tests for the __main__ module.""" | ||
|
||
import asyncio | ||
from contextlib import suppress | ||
|
||
import pytest | ||
|
||
from chaturbate_poller.__main__ import start_polling | ||
|
||
|
||
def test_start_polling() -> None: | ||
"""Test the start_polling function.""" | ||
with ( | ||
suppress(KeyboardInterrupt), | ||
pytest.raises(ValueError, match="Unauthorized access. Verify the username and token."), | ||
): | ||
asyncio.run(start_polling("username", "token", 10, testbed=False, verbose=False)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters