Skip to content

Commit

Permalink
Return the np.array after execution
Browse files Browse the repository at this point in the history
  • Loading branch information
sansmoraxz committed May 17, 2023
1 parent a639712 commit f19cad8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lambda_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ def lambda_handler(event, context):
with io.BytesIO(obj['Body'].read()) as file_bytes:
arr = np.load(file_bytes)
print("Array from S3: ", arr)
return arr
4 changes: 2 additions & 2 deletions tests/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def test_created_object_exists(self):

def test_lambda_handler(self):
"""Test lambda_handler"""
lambda_handler(event, None)
assert True
arr = lambda_handler(event, None)
assert arr.shape == (int(ARR_SIZE),)

def tearDown(self):
"""Tear down method
Expand Down

0 comments on commit f19cad8

Please sign in to comment.