Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
diligejy committed Jan 18, 2024
1 parent aa37363 commit 6510bbb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Practical_MLOps/Ch1/hello.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import numpy as np

def add(x, y):
"""This is an add function"""
return x + y

def numpy_add(x, y):
return x + y


print(add(1, 1))

print(add(2, 1))
print(add(2, 1))

print(numpy_add(np.arange(4), np.arange(4)))
6 changes: 5 additions & 1 deletion Practical_MLOps/Ch1/test_hello.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from hello import add
import numpy as np
from hello import add, numpy_add


def test_add():
assert 2 == add(1, 1)

def test_numpy_add():
assert 1 == 1
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pandas
pytest
pytest-cov
pylint
numpy

0 comments on commit 6510bbb

Please sign in to comment.