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,10 +5,7 @@
# IMPORTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from contextlib import nullcontext as does_not_raise
import pytest;
from pytest import mark;
from unittest import TestCase;
from tests.thirdparty.unit import *;
from src.models.stacks import Stack;
@@ -56,7 +53,7 @@ def test_stack_error_po(test: TestCase):
stack.push('hallo');
stack.push('welt');
stack.push('!');
with pytest.raises(Exception):
with assert_raises(Exception):
stack.pop();
stack.pop();
stack.pop();