Skip to content

Commit

Permalink
More passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NoorelsalamAlmakki committed Dec 30, 2024
1 parent cc022a9 commit a27873b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions solutions/tests/test_convert_string_to_uppercase.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,52 @@ def test_lowercase_string(self):
def test_uppercase_string(self):
"""Test the convert_string_to_uppercase function with an uppercase string"""
self.assertEqual(convert_string_to_uppercase("WORLD"), "WORLD")

def test_mixedcase_string(self):
"""Test the convert_string_to_uppercase function with a mixed case string"""
self.assertEqual(convert_string_to_uppercase("HeLlO"), "HELLO")

def test_multiple_lowercase_words_string(self):
"""Test the convert_string_to_uppercase function with a multiple words string"""
self.assertEqual(
convert_string_to_uppercase("emerging talent"), "EMERGING TALENT"
)

def test_multiple_uppercase_words_string(self):
"""Test the convert_string_to_uppercase function with a multiple words string"""
self.assertEqual(
convert_string_to_uppercase("EMERGING TALENT"), "EMERGING TALENT"
)

def test_multiple_mixedcase_words_string(self):
"""Test the convert_string_to_uppercase function with a multiple words string"""
self.assertEqual(
convert_string_to_uppercase("EmERGing TaLEnt PrOgrAm"),
"EMERGING TALENT PROGRAM",
)

def test_string_with_numbers(self):
"""Test the convert_string_to_uppercase function with a string containing numbers"""
self.assertEqual(convert_string_to_uppercase("hello123"), "HELLO123")

def test_string_with_special_characters(self):
"""Test the convert_string_to_uppercase function with a string containing special characters"""
self.assertEqual(
convert_string_to_uppercase("hello!@#$%^&*()"), "HELLO!@#$%^&*()"
)

def test_string_with_whitespace(self):
"""Test the convert_string_to_uppercase function with a string containing whitespace"""
self.assertEqual(convert_string_to_uppercase(" hello "), " HELLO ")

def test_digits_string(self):
"""Test the convert_string_to_uppercase function with a string containing digits"""
self.assertEqual(convert_string_to_uppercase("123456"), "123456")

def test_string_with_newline(self):
"""Test the convert_string_to_uppercase function with a string containing a newline character"""
self.assertEqual(convert_string_to_uppercase("hello\nworld"), "HELLO\nWORLD")

def test_string_with_only_whitespace(self):
"""Test the convert_string_to_uppercase function with a string with only whitespace"""
self.assertEqual(convert_string_to_uppercase(" "), " ")

0 comments on commit a27873b

Please sign in to comment.