Skip to content
Snippets Groups Projects
Commit 953bf8c7 authored by Daniel Rafeh's avatar Daniel Rafeh
Browse files

Test successful

parent f51cf35f
Branches feature/mixture
No related tags found
No related merge requests found
Pipeline #20110 passed
......@@ -15,6 +15,7 @@
# Bei der Eingabe von Texten mit leeren Trennzeichen (z.B. "//;\n") soll die Zahl 0 ausgegeben werden
# Bei der Eingabe von "1, " soll die Zahl 1 ausgegeben werden
# Bei der Eingabe von "-2, 5" soll "negatives not allowed" ausgegeben werden
# Bei der Eingabe von "//;\n-1;2;1001;-3" soll "negatives not allowed [-1, -3]" ausgegeben werden
import unittest
from abc import ABC, abstractmethod
......@@ -162,5 +163,9 @@ class TestStringCalculator(unittest.TestCase):
res = self.c.add("-2, 5")
self.assertEqual(res, "negatives not allowed")
def test_mixture(self):
res = self.c.add("//;\n-1;2;1001;-3")
self.assertEqual(res, "negatives not allowed " + str([-1, -3]))
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment