zjfz-2019-s402281/intro/Task102Test.py

31 lines
631 B
Python
Raw Normal View History

2020-01-11 19:22:44 +01:00
#!/usr/bin/python3
2020-01-11 17:39:10 +01:00
# -*- coding: utf-8 -*-
"""
Zadanie 102
Napisz funkcję `add_three_numbers` zwracającą sumę trzech liczb całkowitych.
NAME: add_three_numbers
PARAMS: int, int, int
RETURN: int
POINTS: 3
"""
import unittest
from Task102 import add_three_numbers
class Task102Test(unittest.TestCase):
"""Testy do zadania 102"""
def test_simple(self):
"""Prosty test."""
self.assertEqual(add_three_numbers(2, 5, 7), 14)
def test_negatives(self):
"""Test z liczbami ujemnymi."""
self.assertEqual(add_three_numbers(-3, -1, 2), -2)
if __name__ == '__main__':
unittest.main()