@@ -54,63 +54,6 @@ def test_list2str():
54
54
assert isinstance (list2string ([1 , 2 , 3 ], sep = ";" ), str ) # tests with semicolon
55
55
assert list2string ((1 , 2 , 3 ), sep = ";" ) == "1;2;3"
56
56
57
- #
58
- # def test_bdict():
59
- # new_dict = bdict(Alice=27, Bob=30, Dom=23)
60
- #
61
- # assert new_dict[23] == "Dom"
62
- # assert new_dict["Alice"] == 27
63
- #
64
- # # test deleting key
65
- # del new_dict["Alice"]
66
- # with pytest.raises(KeyError):
67
- # new_dict["Alice"]
68
- #
69
- # # test booleans
70
- # new_dict["True"] = True
71
- # assert new_dict["True"] is True
72
- # new_dict["False"] = False
73
- # assert new_dict["False"] is False
74
- # new_dict["None"] = None
75
- # assert new_dict["None"] is None
76
- #
77
- #
78
- # def test_bdict_from_dict():
79
- # original_dict = {"Alice": 27, "Bob": 30, "Dom": 23}
80
- #
81
- # new_dict = bdict(original_dict)
82
- #
83
- # assert new_dict[23] == "Dom"
84
- # assert new_dict["Alice"] == 27
85
- #
86
- #
87
- # def test_bdict_booleans():
88
- # original_dict = {"True": True, "False": False, "None": None}
89
- #
90
- # new_dict = bdict(original_dict)
91
- #
92
- # assert new_dict[True] == "True"
93
- # assert new_dict["True"]
94
- #
95
- # original_dict = {True: True, False: False, None: None}
96
- #
97
- # new_dict = bdict(original_dict)
98
- #
99
- # assert new_dict[True]
100
- #
101
- #
102
- # def test_bdict_from_zip():
103
- # new_dict = bdict(zip(["Alice", "Bob", "Dom"], [27, 30, 23]))
104
- #
105
- # assert new_dict[23] == "Dom"
106
- # assert new_dict["Alice"] == 27
107
- #
108
- #
109
- # def test_bdict_from_list():
110
- # new_dict = bdict([("Alice", 27), ("Bob", 30), ("Dom", 23)])
111
- #
112
- # assert new_dict[23] == "Dom"
113
- # assert new_dict["Alice"] == 27
114
57
#
115
58
#
116
59
# def test_bdict_errors():
@@ -124,32 +67,6 @@ def test_list2str():
124
67
# new_dict["Value1"] = "Key1"
125
68
#
126
69
#
127
- # def test_bdict_bool():
128
- # new_dict = bdict(N=None, T=True, F=False)
129
- #
130
- # print(new_dict)
131
- #
132
- # assert None in new_dict
133
- # assert True in new_dict
134
- # assert True in new_dict
135
- #
136
- # assert isinstance(new_dict["T"], bool) and new_dict["T"]
137
- # assert isinstance(new_dict["F"], bool) and not new_dict["F"]
138
- #
139
- # assert new_dict[True] == "T"
140
- # assert new_dict[False] == "F"
141
- # assert new_dict[None] == "N"
142
- #
143
- # assert "_None" in new_dict
144
- # assert new_dict["_None"] == "N"
145
- #
146
- # # Test for pyMHDAC
147
- # new_dict_2 = bdict(Unspecified=0, _None=1, GC=2, LC=3, CE=4)
148
- #
149
- # assert None in new_dict_2
150
- #
151
- # assert new_dict_2[None] == 1
152
-
153
70
154
71
def test_as_text ():
155
72
assert utils .as_text (12345 ) == "12345"
0 commit comments