Skip to content

Commit

Permalink
The Hashtag Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Dec 13, 2024
1 parent b1e4f78 commit 0123415
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions kyu_5/the_hashtag_generator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The Hashtag Generator."""
6 changes: 3 additions & 3 deletions kyu_5/the_hashtag_generator/hashtag_generator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Solution for -> The Hashtag Generator
Solution for -> The Hashtag Generator.
Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""
Expand All @@ -12,8 +13,7 @@ def generate_hashtag(word: str) -> bool | str:
1. It must start with a hashtag (#).
2. All words must have their first letter capitalized.
3. If the final result is longer than 140 chars it must return false.
4. If the input or t he result is an empty string it must return false.
4. If the input or the result is an empty string it must return false.
:param word: str
:return:
"""
Expand Down
11 changes: 6 additions & 5 deletions kyu_5/the_hashtag_generator/test_generate_hashtag.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Test for -> 'generate_hashtag' function
Test for -> 'generate_hashtag' function.
Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""
Expand Down Expand Up @@ -27,13 +28,13 @@
name='Source/Kata')
# pylint: enable-msg=R0801
class GenerateHashtagTestCase(unittest.TestCase):
"""
Testing generate_hashtag function
"""
"""Testing generate_hashtag function."""

def test_generate_hashtag(self):
"""
Testing 'generate_hashtag' function
Testing 'generate_hashtag' function with various test data.
:return:
"""
allure.dynamic.title("Testing 'generate_hashtag' function")
allure.dynamic.severity(allure.severity_level.NORMAL)
Expand Down

0 comments on commit 0123415

Please sign in to comment.