master > master: code py - unit tests aktualisiert

This commit is contained in:
RD
2022-06-11 14:02:09 +02:00
parent 17ea04cfee
commit d454f71bfa
12 changed files with 434 additions and 42 deletions

View File

@@ -5,14 +5,9 @@
# IMPORTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import pytest;
from pytest import mark;
from pytest import fixture;
from pytest import lazy_fixture;
from unittest import TestCase;
from unittest.mock import patch;
from tests.thirdparty.unit import *;
from src.thirdparty.types import *;
from src.models.graphs import *;
from src.algorithms.tarjan import *;
@@ -77,7 +72,7 @@ def test_tarjan(test, G, expected):
@mark.parametrize(('G', 'expected'), [ (lazy_fixture('graph1'), [[1], [3], [2,4]])])
@mark.usefixtures('test')
def test_failable_tarjan(test, G, expected):
with pytest.raises(AssertionError):
with assert_raises(AssertionError):
test_tarjan(test, G, expected);
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~