Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZotov committed Nov 26, 2024
1 parent 975a309 commit d4d8c11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/test_keynodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ def test_rrel(self):
self.assertTrue(rrel_1.is_valid())
self.assertTrue(get_elements_types(rrel_1)[0].is_role())

def test_large_rrel(self):
def test_max_rrel(self):
self.assertRaises(KeyError, ScKeynodes.rrel_index, ScKeynodes._max_rrel_index + 1)

def test_min_rrel(self):
self.assertRaises(KeyError, ScKeynodes.rrel_index, ScKeynodes._min_rrel_index - 1)

def test_wrong_rrel(self):
self.assertRaises(TypeError, ScKeynodes.rrel_index, "str")
5 changes: 4 additions & 1 deletion tests/test_utils/test_common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
(See an accompanying file LICENSE or a copy at https://opensource.org/licenses/MIT)
"""

import pytest

from sc_client import client
from sc_client.client import erase_elements
from sc_client.constants import sc_type
from sc_client.constants import sc_type, exceptions

from sc_kpm import ScKeynodes
from sc_kpm.utils.common_utils import (
Expand Down Expand Up @@ -136,3 +138,4 @@ def test_deletion_utils(self):
nrel_connector = generate_non_role_relation(src, nrel_trg)
assert erase_connectors(src, rrel_trg, sc_type.VAR_PERM_POS_ARC)
assert erase_elements(nrel_connector, src, rrel_trg, nrel_trg)
self.assertRaises(exceptions.ServerError, client.check_elements(rrel_connector)[0])

0 comments on commit d4d8c11

Please sign in to comment.