Skip to content

Commit 671c2d3

Browse files
authored
Merge pull request #20 from nofarb/nofarb-patch-15
Update README.md
2 parents e1e6508 + 7e7c081 commit 671c2d3

4 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/test-python.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ name: only tests - Python
66

77
on:
88
push:
9-
branches: [ "main" ]
9+
branches:
10+
- "nofar*"
11+
- "main"
1012
pull_request:
1113
branches: [ "main" ]
1214

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ test repo
1212

1313

1414

15+

calculator.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ def divide(a, b):
2222
raise ValueError("Cannot divide by zero.")
2323
return a / b
2424

25+
@staticmethod
26+
def power(a, b):
27+
return a ** b
28+
29+
@staticmethod
30+
def modulo(a, b):
31+
if b == 0:
32+
raise ValueError("Cannot perform modulo by zero.")
33+
return a % b
34+
2535

2636
def insecure_hash(password: str) -> str:
2737
# MD5 is considered cryptographically broken and unsuitable for further use.

test_calculator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ def test_add():
77
calc = Calculator()
88
time.sleep(1)
99
assert calc.add(2, 4) == 6
10+
11+
def test_add2():
12+
calc = Calculator()
13+
time.sleep(1)
14+
assert calc.add(3, 4) == 7
1015

1116
def test_long_running_one():
1217
# Simulating a long process

0 commit comments

Comments
 (0)