Skip to content

Commit 0a2cf49

Browse files
committed
Add tests
1 parent 6c43775 commit 0a2cf49

File tree

8 files changed

+12
-1
lines changed

8 files changed

+12
-1
lines changed

array_string/__init__.py

Whitespace-only changes.

array_string/greatest_common_divisor_of_strings/__init__.py

Whitespace-only changes.

array_string/merge_strings_alternately/__init__.py

Whitespace-only changes.

tests/__init__.py

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pytest
2+
from array_string.greatest_common_divisor_of_strings.solution import Solution
3+
4+
@pytest.mark.parametrize("str1, str2, expected", [
5+
("ABCABC", "ABC", "ABC"),
6+
("ABABAB", "ABAB", "AB"),
7+
("LEET", "CODE", "")
8+
])
9+
def test_merge_alternately(str1, str2, expected):
10+
solution = Solution()
11+
assert solution.gcdOfStrings(str1, str2) == expected

array-string/1768_merge_strings_alternately/test_solution.py renamed to tests/test_merge_strings_alternately.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
from solution import Solution
2+
from array_string.merge_strings_alternately.solution import Solution
33

44
@pytest.mark.parametrize("word1, word2, expected", [
55
("abc", "pqr", "apbqcr"),

0 commit comments

Comments
 (0)