forked from tdwojak/Python2017
23 lines
455 B
Python
Executable File
23 lines
455 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
def suma(a, b):
|
|
"""
|
|
Napisz funkcję, która zwraca sumę elementów.
|
|
"""
|
|
pass
|
|
|
|
def tests(f):
|
|
inputs = [(2, 3), (0, 0), (1, 1)]
|
|
outputs = [5, 0, 2]
|
|
|
|
for input, output in zip(inputs, outputs):
|
|
if f(*input) != output:
|
|
return "ERROR: {}!={}".format(f(*input), output)
|
|
break
|
|
return "TESTS PASSED"
|
|
|
|
if __name__ == "__main__":
|
|
print(tests(suma))
|