"git@gitlab.surrey.ac.uk:ri0005/binary_c-python.git" did not exist on "90d656ecb430ffcb223b7e5d23d713d6563be2cd"
Newer
Older
David Hendriks
committed
from binarycpython.utils.functions import *
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#############################
# Script that contains unit tests for functions from the binarycpython.utils.functions file
def test_get_help_super():
"""
Function to test the get_help_super function
"""
get_help_super_output = get_help_super()
get_help_super_keys = get_help_super_output.keys()
assert "stars" in get_help_super_keys, "missing section"
assert "binary" in get_help_super_keys, "missing section"
assert "nucsyn" in get_help_super_keys, "missing section"
assert "output" in get_help_super_keys, "missing section"
assert "i/o" in get_help_super_keys, "missing section"
assert "algorithms" in get_help_super_keys, "missing section"
assert "misc" in get_help_super_keys, "missing section"
def test_get_help_all():
"""
Function to test the get_help_all function
"""
get_help_all_output = get_help_all(print_help=False)
get_help_all_keys = get_help_all_output.keys()
assert "stars" in get_help_all_keys, "missing section"
assert "binary" in get_help_all_keys, "missing section"
assert "nucsyn" in get_help_all_keys, "missing section"
assert "output" in get_help_all_keys, "missing section"
assert "i/o" in get_help_all_keys, "missing section"
assert "algorithms" in get_help_all_keys, "missing section"
assert "misc" in get_help_all_keys, "missing section"
def test_get_help():
"""
Function to test the get_help function
"""
assert (
get_help("M_1", print_help=False)["parameter_name"] == "M_1"
), "get_help('M_1') should return the correct parameter name"
def all():
test_get_help()
test_get_help_all()
test_get_help_super()
if __name__ == "__main__":
all()