Skip to content

Commit

Permalink
lint with black
Browse files Browse the repository at this point in the history
  • Loading branch information
elewis2 committed Jun 18, 2024
1 parent 61523a7 commit 2e9ba6b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/test_graphkb/test_graphkb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def conn():
conn.login(os.environ["GRAPHKB_USER"], os.environ["GRAPHKB_PASS"])
return conn


class TestPaginate:
@mock.patch("pori_python.graphkb.GraphKBConnection.request")
def test_does_not_paginate_when_false(self, graphkb_request, conn):
Expand Down
6 changes: 5 additions & 1 deletion tests/test_graphkb/test_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

import pori_python.graphkb
from pori_python.graphkb import GraphKBConnection, match
from pori_python.graphkb.constants import DEFAULT_NON_STRUCTURAL_VARIANT_TYPE, STRUCTURAL_VARIANT_SIZE_THRESHOLD
from pori_python.graphkb.constants import (
DEFAULT_NON_STRUCTURAL_VARIANT_TYPE,
STRUCTURAL_VARIANT_SIZE_THRESHOLD,
)
from pori_python.graphkb.util import FeatureNotFoundError

# Test datasets
Expand Down Expand Up @@ -500,6 +503,7 @@ def test_filling_cache(self):
assert "alice" in match.FEATURES_CACHE
match.FEATURES_CACHE = None


class TestTypeScreening:
# Types as class variables
default_type = DEFAULT_NON_STRUCTURAL_VARIANT_TYPE
Expand Down
3 changes: 1 addition & 2 deletions tests/test_ipr/test_annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def graphkb_conn():
graphkb_conn.login(username, password)
return graphkb_conn


class TestAnnotation:
def test_annotate_nonsense_vs_missense(self, graphkb_conn):
"""Verify missense (point mutation) is not mistaken for a nonsense (stop codon) mutation."""
Expand All @@ -58,7 +59,6 @@ def test_annotate_nonsense_vs_missense(self, graphkb_conn):
assert not nonsense, f"nonsense matched to {key}: {TP53_MUT_DICT[key]}"
assert matched, f"should have matched in {key}: {TP53_MUT_DICT[key]}"


def test_annotate_nonsense_vs_missense_protein(self, graphkb_conn):
"""Verify missense (point mutation) is not mistaken for a nonsense (stop codon) mutation."""
disease = 'cancer'
Expand All @@ -69,7 +69,6 @@ def test_annotate_nonsense_vs_missense_protein(self, graphkb_conn):
assert not nonsense, f"nonsense matched to {key}: {TP53_MUT_DICT[key]}"
assert matched, f"should have matched in {key}: {TP53_MUT_DICT[key]}"


def test_annotate_structural_variants_tp53(self, graphkb_conn):
"""Verify alternate TP53 variants match."""
disease = 'cancer'
Expand Down
6 changes: 5 additions & 1 deletion tests/test_ipr/test_summary.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from unittest.mock import MagicMock

from pori_python.ipr.summary import GRAPHKB_GUI, get_preferred_drug_representation, substitute_sentence_template
from pori_python.ipr.summary import (
GRAPHKB_GUI,
get_preferred_drug_representation,
substitute_sentence_template,
)


class TestGetPreferredDrugRepresentation:
Expand Down

0 comments on commit 2e9ba6b

Please sign in to comment.