Skip to content

Commit

Permalink
Merge pull request #22 from camposandro/sandro/test-actions-bump
Browse files Browse the repository at this point in the history
Test actions version bump
  • Loading branch information
camposandro authored Feb 6, 2024
2 parents d51cb45 + 7716aed commit a617e0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
python -m pytest
- name: Send status to author's email
if: ${{ failure() }} && github.event_name != 'workflow_dispatch' }} # Only email if the workflow failed and was not manually started. Customize this as necessary.
uses: dawidd6/action-send-mail@main
uses: dawidd6/action-send-mail@master
with:
# Required mail server address if not connection_url:
server_address: smtp.gmail.com
Expand Down
4 changes: 3 additions & 1 deletion src/benchmarking_asv/example_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def meaning() -> int:

def run_time_computation():
"""Mock function for random time computation."""
time.sleep(random.uniform(0, 4))
sleep_time = random.uniform(0, 4)
time.sleep(sleep_time)
return sleep_time


def run_mem_computation():
Expand Down
10 changes: 10 additions & 0 deletions tests/benchmarking_asv/test_example_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ def test_meaning() -> None:
"""Verify the output of the `meaning` function"""
output = example_module.meaning()
assert output == 42


def test_run_time_computation() -> None:
output = example_module.run_time_computation()
assert 0 <= output <= 4


def test_mem_computation() -> None:
output = example_module.run_mem_computation()
assert 0 <= len(output) <= 512

0 comments on commit a617e0a

Please sign in to comment.