Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Silly python function (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg authored Feb 20, 2024
2 parents 93f956f + 7fd02fe commit c41e68c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/selfie-lib/selfie_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .ned import fizzbuzz as fizzbuzz
from .harvir import silly_addition as silly_addition
4 changes: 4 additions & 0 deletions python/selfie-lib/selfie_lib/harvir.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def silly_addition(a, b):
# Adds two numbers and then adds 42 to the result.
return a + b + 42

6 changes: 6 additions & 0 deletions python/selfie-lib/tests/harvir_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from selfie_lib import silly_addition

def test_silly_addition():
assert silly_addition(1, 2) == 45, "Should be 45"
assert silly_addition(-42, 0) == 0, "Should be 0"
assert silly_addition(10, 5) == 57, "Should be 57"

0 comments on commit c41e68c

Please sign in to comment.