diff --git a/.travis.yml b/.travis.yml index b666f03..da74d92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ language: python +CI: true sudo: false python: - 2.7 - 3.4 +- 3.7 +before_script: echo "Printing before script" script: py.test -v diff --git a/README.md b/README.md index dce752e..0f56297 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -# python-example \ No newline at end of file +[![Build Status](https://travis-ci.org/redxm-x/python-example.svg?branch=master)](https://travis-ci.org/redxm-x/python-example) +# python-example diff --git a/hello.py b/hello.py index d4fb0b0..935b861 100644 --- a/hello.py +++ b/hello.py @@ -9,9 +9,18 @@ def hello(what): def say_what(): return 'world' +def add_numbers(a, b): + result = a+b + return result def main(): hello(say_what()) + add_numbers(2, 2) + add_numbers(3, 3) + add_numbers(4, 4) + add_numbers(5, 5) + print('lol1') + print('xd') return 0 diff --git a/tests/test_hello.py b/tests/test_hello.py index a9ecb71..eaf4a2b 100644 --- a/tests/test_hello.py +++ b/tests/test_hello.py @@ -1,5 +1,11 @@ -import hello +from hello import * -def test_says_world(): - assert hello.say_what() == 'world' +def test_1(): + assert add_numbers(2, 2) == 4 +def test_2(): + assert add_numbers(3, 3) == 6 +def test_3(): + assert add_numbers(4, 4) == 8 +def test_4(): + assert add_numbers(5, 5) == 10