Skip to content

Commit

Permalink
Merge branch 'main' into interface-updates-epic
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Nov 25, 2023
2 parents 8eeed08 + 5f678bc commit fd2ae77
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Provide utilities for test cases."""
import logging

import pytest

from gene.database import AbstractDatabase, create_db
Expand All @@ -10,6 +12,26 @@ def database() -> AbstractDatabase:
return create_db()


def pytest_addoption(parser):
"""Add custom commands to pytest invocation.
See https://docs.pytest.org/en/7.1.x/reference/reference.html#parser
"""
parser.addoption(
"--verbose-logs",
action="store_true",
default=False,
help="show noisy module logs",
)


def pytest_configure(config):
"""Configure pytest setup."""
if not config.getoption("--verbose-logs"):
logging.getLogger("botocore").setLevel(logging.ERROR)
logging.getLogger("boto3").setLevel(logging.ERROR)
logging.getLogger("urllib3.connectionpool").setLevel(logging.ERROR)


def _compare_records(normalized_gene, test_gene, match_type):
"""Check that normalized_gene and test_gene are the same."""
assert normalized_gene.match_type == match_type
Expand Down

0 comments on commit fd2ae77

Please sign in to comment.