Skip to content

Commit

Permalink
Remove unused pytest type ignores
Browse files Browse the repository at this point in the history
95178d2

No longer needed after upgrading to pytest 6
  • Loading branch information
br3ndonland committed Sep 2, 2020
1 parent 7f642dc commit 3dc8085
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/app/test_main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
from typing import Dict, List

import pytest # type: ignore
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.applications import Starlette
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from pathlib import Path
from typing import Any, Dict, List

import pytest # type: ignore
from _pytest.monkeypatch import MonkeyPatch # type: ignore
from _pytest.tmpdir import TempPathFactory # type: ignore
import pytest
from _pytest.monkeypatch import MonkeyPatch
from _pytest.tmpdir import TempPathFactory
from fastapi.testclient import TestClient
from pytest_mock import MockerFixture

Expand Down
15 changes: 13 additions & 2 deletions tests/test_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from pathlib import Path
from typing import Any, Dict

import pytest # type: ignore
from _pytest.monkeypatch import MonkeyPatch # type: ignore
import pytest
from _pytest.monkeypatch import MonkeyPatch
from pytest_mock import MockerFixture

from inboard import start
Expand Down Expand Up @@ -54,6 +54,17 @@ class TestConfigureLogging:
---
"""

def test_configure_logging_conf_module(
self, logging_conf_module_path: str, mock_logger: logging.Logger
) -> None:
"""Test `start.configure_logging` with correct logging config path."""
start.configure_logging(
logger=mock_logger, logging_conf=logging_conf_module_path
)
mock_logger.debug.assert_called_once_with( # type: ignore
f"Logging dict config loaded from {logging_conf_module_path}."
)

def test_configure_logging_conf_path(
self, logging_conf_path: Path, mock_logger: logging.Logger
) -> None:
Expand Down

0 comments on commit 3dc8085

Please sign in to comment.