master > master: code py - unit tests aktualisiert
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user