4
.github/workflows/build-test.yml
vendored
4
.github/workflows/build-test.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
|||||||
- name: Run pytest
|
- name: Run pytest
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
poetry run pytest
|
poetry run pytest --cov=./ --cov-report=xml kittycad
|
||||||
env:
|
env:
|
||||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
|
|
||||||
@ -58,6 +58,6 @@ jobs:
|
|||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
flags: unittests
|
flags: unittests
|
||||||
files: ${{ github.workspace }}/coverage.txt
|
files: ${{ github.workspace }}/coverage.xml
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
from ...client import AuthenticatedClientFromEnv
|
import pytest
|
||||||
from ...models import FileConversion, ValidFileTypes, AuthSession, InstanceMetadata
|
import asyncio
|
||||||
from ...api.file import file_convert_with_base64_helper
|
|
||||||
from ...api.meta import meta_debug_session, meta_debug_instance
|
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():
|
def test_get_session():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
@ -12,7 +15,8 @@ def test_get_session():
|
|||||||
|
|
||||||
print(f"Session: {session}")
|
print(f"Session: {session}")
|
||||||
|
|
||||||
def test_get_session_async():
|
@pytest.mark.asyncio
|
||||||
|
async def test_get_session_async():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
client = AuthenticatedClientFromEnv()
|
client = AuthenticatedClientFromEnv()
|
||||||
|
|
||||||
@ -29,7 +33,8 @@ def test_get_instance():
|
|||||||
instance: InstanceMetadata = meta_debug_instance.sync(client=client)
|
instance: InstanceMetadata = meta_debug_instance.sync(client=client)
|
||||||
print(f"Instance: {instance}")
|
print(f"Instance: {instance}")
|
||||||
|
|
||||||
def test_get_instance_async():
|
@pytest.mark.asyncio
|
||||||
|
async def test_get_instance_async():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
client = AuthenticatedClientFromEnv()
|
client = AuthenticatedClientFromEnv()
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ sphinxcontrib-spelling = "^7.3.0"
|
|||||||
toml = "^0.10.2"
|
toml = "^0.10.2"
|
||||||
sphinx-rtd-theme = "^1.0.0"
|
sphinx-rtd-theme = "^1.0.0"
|
||||||
sphinx-automodapi = "^0.13"
|
sphinx-automodapi = "^0.13"
|
||||||
|
pytest-cov = "^3.0.0"
|
||||||
|
pytest-asyncio = "^0.16.0"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry>=1.0"]
|
requires = ["poetry>=1.0"]
|
||||||
|
Reference in New Issue
Block a user