Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ loguru pytest #252

Merged
merged 3 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
dynaconf==3.2.0 ; python_version >= "3.10" and python_version < "4.0"
emoji==2.6.0 ; python_version >= "3.10" and python_version < "4.0"
emoji==2.7.0 ; python_version >= "3.10" and python_version < "4.0"
loguru==0.7.0 ; python_version >= "3.10" and python_version < "4.0"
pyparsing==3.1.0 ; python_version >= "3.10" and python_version < "4.0"
win32-setctime==1.1.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
5 changes: 4 additions & 1 deletion examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
"""

import asyncio
import logging
import sys

import uvicorn
from fastapi import FastAPI
from loguru import logger

from findmyorder import FindMyOrder, __version__

logger.remove()
logger.add(sys.stderr, level="INFO")

async def main():
"""Main"""
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pytest = "^7.0"
pytest-cov = "^4.1"
pytest-asyncio = "^0.21.0"
pytest-mock = "^3.11.1"
pytest-loguru = "^0.2.0"

[tool.poetry.group.docs]
optional = true
Expand Down
9 changes: 8 additions & 1 deletion tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,19 @@ async def test_short_valid_get_order(fmo, short_order, result_order):


@pytest.mark.asyncio
async def test_ignore_eorder(fmo, ignore_order):
async def test_ignore_order(fmo, ignore_order):
"""ignore order Testing"""
result = await fmo.get_order(ignore_order)
assert result is None


@pytest.mark.asyncio
async def test_invalid_get_order(fmo, invalid_order):
"""ignore order Testing"""
result = await fmo.get_order(invalid_order)
assert result is None


@pytest.mark.asyncio
async def test_mapping_order(
fmo,
Expand Down