-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_main.py
More file actions
29 lines (22 loc) · 766 Bytes
/
test_main.py
File metadata and controls
29 lines (22 loc) · 766 Bytes
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
"""
Unit tests
"""
import unittest
from main import custom_function
class TestCustomFunction(unittest.TestCase):
def test_custom_function_with_input(self):
"""
Test custom_function with a specific input
"""
input_value = "test_input"
expected_output = "Custom function output: test_input"
self.assertEqual(custom_function(input_value), expected_output)
def test_custom_function_with_default_value(self):
"""
Test custom_function with the default value
"""
input_value = "default_value"
expected_output = "Custom function output: default_value"
self.assertEqual(custom_function(input_value), expected_output)
if __name__ == "__main__":
unittest.main()