Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2021-12-15 06:49:45 -08:00
parent a4d57836f5
commit 0d0afa4497
3 changed files with 15 additions and 8 deletions

View File

@ -48,7 +48,7 @@ jobs:
- name: Run pytest
shell: bash
run: |
poetry run pytest
poetry run pytest --cov=./ --cov-report=xml kittycad
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
@ -58,6 +58,6 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: unittests
files: ${{ github.workspace }}/coverage.txt
files: ${{ github.workspace }}/coverage.xml
verbose: true

View File

@ -1,7 +1,10 @@
from ...client import AuthenticatedClientFromEnv
from ...models import FileConversion, ValidFileTypes, AuthSession, InstanceMetadata
from ...api.file import file_convert_with_base64_helper
from ...api.meta import meta_debug_session, meta_debug_instance
import pytest
import asyncio
from .client import AuthenticatedClientFromEnv
from .models import FileConversion, ValidFileTypes, AuthSession, InstanceMetadata
from .api.file import file_convert_with_base64_helper
from .api.meta import meta_debug_session, meta_debug_instance
def test_get_session():
# Create our client.
@ -12,7 +15,8 @@ def test_get_session():
print(f"Session: {session}")
def test_get_session_async():
@pytest.mark.asyncio
async def test_get_session_async():
# Create our client.
client = AuthenticatedClientFromEnv()
@ -29,7 +33,8 @@ def test_get_instance():
instance: InstanceMetadata = meta_debug_instance.sync(client=client)
print(f"Instance: {instance}")
def test_get_instance_async():
@pytest.mark.asyncio
async def test_get_instance_async():
# Create our client.
client = AuthenticatedClientFromEnv()

View File

@ -27,6 +27,8 @@ sphinxcontrib-spelling = "^7.3.0"
toml = "^0.10.2"
sphinx-rtd-theme = "^1.0.0"
sphinx-automodapi = "^0.13"
pytest-cov = "^3.0.0"
pytest-asyncio = "^0.16.0"
[build-system]
requires = ["poetry>=1.0"]