Design Architecture for Utility Functions (iss-1ac610bafd4c)
Some checks failed
ci / test (push) Has been cancelled
Some checks failed
ci / test (push) Has been cancelled
This commit is contained in:
parent
37136d73d3
commit
ec3ff85206
1 changed files with 15 additions and 0 deletions
15
tests/test_string_utils.py
Normal file
15
tests/test_string_utils.py
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
import unittest
|
||||||
|
from utils.string_utils import capitalize_first_letter, reverse_string
|
||||||
|
|
||||||
|
|
||||||
|
class TestStringUtils(unittest.TestCase):
|
||||||
|
def test_capitalize_first_letter(self):
|
||||||
|
self.assertEqual(capitalize_first_letter('hello'), 'Hello')
|
||||||
|
self.assertEqual(capitalize_first_letter(''), '')
|
||||||
|
|
||||||
|
def test_reverse_string(self):
|
||||||
|
self.assertEqual(reverse_string('hello'), 'olleh')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue