Skip to content

Commit

Permalink
Create test_hello_world.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zaihuaji authored Jan 15, 2025
1 parent cb67fde commit 546c32f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_hello_world.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# test_hello_world.py

import pytest
from rda_python_template.hello_world import get_string

def test_get_string():
assert get_string('Bob') == 'Bob: Hello World!'

def test_raises_exception_on_non_string_arguments():
with pytest.raises(TypeError):
get_string(9)

0 comments on commit 546c32f

Please sign in to comment.