-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain_third_test.py
36 lines (22 loc) · 1.07 KB
/
main_third_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from main import combine_first_name_and_last_name
def test_combine_first_name_and_last_name() -> None:
res = combine_first_name_and_last_name("hidayat", "hamir")
assert res == "hidayat hamir"
def test_combine_first_name_and_last_name_fn_is_none() -> None:
res = combine_first_name_and_last_name(None, "hamir")
assert res == "hamir"
def test_combine_first_name_and_last_name_ln_is_none() -> None:
res = combine_first_name_and_last_name("hidayat", None)
assert res == "hidayat"
def test_combine_first_name_and_last_name_fn_ln_is_none() -> None:
res = combine_first_name_and_last_name(None, None)
assert res == ""
def test_combine_first_name_and_last_name_fn_is_empty() -> None:
res = combine_first_name_and_last_name("", "hamir")
assert res == "hamir"
def test_combine_first_name_and_last_name_ln_is_empty() -> None:
res = combine_first_name_and_last_name("hidayat", "")
assert res == "hidayat"
def test_combine_first_name_and_last_name_fn_ln_is_empty() -> None:
res = combine_first_name_and_last_name("", "")
assert res == ""