From 9cc16dd2a196785d7703123437180c3d296f4b58 Mon Sep 17 00:00:00 2001 From: chloetychang Date: Sat, 24 Jun 2023 14:59:34 +0800 Subject: [PATCH 1/2] added return function --- chloetychang/__init__.py | 0 chloetychang/test_addition.py | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 chloetychang/__init__.py create mode 100644 chloetychang/test_addition.py diff --git a/chloetychang/__init__.py b/chloetychang/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/chloetychang/test_addition.py b/chloetychang/test_addition.py new file mode 100644 index 0000000..4130298 --- /dev/null +++ b/chloetychang/test_addition.py @@ -0,0 +1,8 @@ +def add(a, b): + """Add a and b""" + return a + b + +def test_add(): + assert add(1, 1) == 2 + assert add(0, 0) == 0 + assert add(1, -1) == 0 From ca717378939abb0d179d416cb3ec6d3a4773bc6d Mon Sep 17 00:00:00 2001 From: chloetychang Date: Sat, 24 Jun 2023 15:09:42 +0800 Subject: [PATCH 2/2] Added return function --- brendan/__init__.py | 0 brendan/test_addition.py | 9 +++++++++ 2 files changed, 9 insertions(+) create mode 100644 brendan/__init__.py create mode 100644 brendan/test_addition.py diff --git a/brendan/__init__.py b/brendan/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/brendan/test_addition.py b/brendan/test_addition.py new file mode 100644 index 0000000..bca0b4f --- /dev/null +++ b/brendan/test_addition.py @@ -0,0 +1,9 @@ +def add(a, b): + """Add a and b""" + return a + b + + +def test_add(): + assert add(1, 1) == 2 + assert add(0, 0) == 0 + assert add(1, -1) == 0