v0.4.0 #53

Merged
profitroll merged 108 commits from dev into master 2024-09-08 02:54:11 +03:00
5 changed files with 33 additions and 1 deletions
Showing only changes of commit 9733557463 - Show all commits

View File

@ -18,6 +18,8 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps: steps:
env:
RMV_TOKEN: ${{ secrets.RMV_TOKEN }}
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3 uses: actions/setup-python@v3

15
tests/conftest.py Normal file
View File

@ -0,0 +1,15 @@
from os import environ
import pytest
from pyrmv import Client
@pytest.fixture()
def api_token() -> str:
return environ.get("RMV_TOKEN")
@pytest.fixture()
def api_client(api_token: str) -> Client:
return Client(api_token)

8
tests/test_client.py Normal file
View File

@ -0,0 +1,8 @@
import pytest
from pyrmv import Client
from pyrmv.classes import Stop
def test_stop_by_name(api_client: Client):
assert isinstance(api_client.stop_by_name("Hauptwache", max_number=1)[0], Stop)

7
tests/test_raw.py Normal file
View File

@ -0,0 +1,7 @@
import pytest
from pyrmv.raw import stop_by_name
def test_stop_by_name(api_token: str):
assert isinstance(stop_by_name(api_token, "Hauptwache", maxNo=1), dict)

View File

@ -18,5 +18,5 @@ deps =
-r{toxinidir}/requirements/_.txt -r{toxinidir}/requirements/_.txt
-r{toxinidir}/requirements/dev.txt -r{toxinidir}/requirements/dev.txt
commands = commands =
pytest --basetemp={envtmpdir} --cov=cringepredictor --cov-report term-missing pytest --basetemp={envtmpdir} --cov=pyrmv --cov-report term-missing