diff --git a/core.py b/core.py index 3c57548..70f521a 100644 --- a/core.py +++ b/core.py @@ -1,3 +1,7 @@ def add(x, y, z=0): """Add two (or three) objects""" - return x + y + z \ No newline at end of file + return x + y + z + +def add_2(x): + """Add two to a number""" + return x + 2 \ No newline at end of file diff --git a/test_core.py b/test_core.py index 421dd7b..7d73ac7 100644 --- a/test_core.py +++ b/test_core.py @@ -1,13 +1,19 @@ -from core import add +from core import * def test_add(): """Check that `add()` works as expected""" - + assert add(2, 3) == 5 def test_add_z(): """Check that `add()` works as expected""" - + assert add(2, 3, 1) == 6 + + +def test_add_2(): + """Check that `add()` works as expected""" + + assert add_2(3) == 5 \ No newline at end of file