Skip to content

Commit

Permalink
chore: add test for generate_db
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen-RA-King committed Aug 27, 2022
1 parent f9f0f64 commit cbd7fa1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ repos:
args:
- --ignore-missing-imports
- --disallow-untyped-defs
exclude: "(?x)^(\n docs/source/conf.py|\n cleanup.py|\n tasks.py\n)$\n"
exclude: |
(?x)^(
docs/source/conf.py|
cleanup.py|
tasks.py
tests
)$
id: mypy
repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
17 changes: 17 additions & 0 deletions tests/test_generate_db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Core Library modules
from typing import Any

# Third party modules
import pytest

# First party modules
from piptools_sync import piptools_sync

TEST_DIR = pytest.TEST_DIR


def test_generate_db(
mock_get_precommit_repos: Any, mock_get_latest_pypi_repo_version: Any
) -> None:
result = piptools_sync.generate_db()
assert result == {"https://github.com/pre-commit/mirrors-mypy": "mypy"}

0 comments on commit cbd7fa1

Please sign in to comment.