Skip to content

Commit

Permalink
Merge pull request #252 from mraniki/dev
Browse files Browse the repository at this point in the history
✅ loguru pytest
  • Loading branch information
mraniki committed Jul 25, 2023
2 parents 0addc93 + 0142dd9 commit e9f03ee
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
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

0 comments on commit e9f03ee

Please sign in to comment.