Skip to content

Commit c241600

Browse files
committed
Test main done (initial version).
1 parent 039da0f commit c241600

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

test/test_main.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,29 @@ def test_display():
4646

4747
def test_scblbl_input():
4848
example = {"in": np.array([1,2,3,4]).astype(np.int32)}
49-
result = sclbl_input(example)
49+
result = sclbl_input(example, _verbose=False)
5050
assert result == '{"input": CAQQBkoQAQAAAAIAAAADAAAABAAAAA==, "type":"pb"}', "PB output not correct."
5151

5252
example = {"x1": np.array([1,2,3,4]).astype(np.int32), "x2": np.array([1,2,3,4]).astype(np.int32)}
53-
result = sclbl_input(example)
54-
assert result == '{"input": ["CAQQBkoQAQAAAAIAAAADAAAABAAAAA==","CAQQBkoQAQAAAAIAAAADAAAABAAAAA=="], "type":"pb"}', "PB output 2 not correct."
53+
result = sclbl_input(example, _verbose=False)
54+
assert result == '{"input": ["CAQQBkoQAQAAAAIAAAADAAAABAAAAA==","CAQQBkoQAQAAAAIAAAADAAAABAAAAA=="], "type":"pb"}',\
55+
"PB output 2 not correct. "
5556

56-
# todo: Do raw tests.
57+
example = {"in": np.array([1,2,3,4]).astype(np.int32)}
58+
result = sclbl_input(example, "raw", _verbose=False)
59+
assert result == '{"input": AQAAAAIAAAADAAAABAAAAA==, "type":"raw"}', "Raw output not correct."
60+
61+
example = {"x1": np.array([1,2,3,4]).astype(np.int32), "x2": np.array([1,2,3,4]).astype(np.int32)}
62+
result = sclbl_input(example, "raw", _verbose=False)
63+
assert result == '{"input": ["AQAAAAIAAAADAAAABAAAAA==","AQAAAAIAAAADAAAABAAAAA=="], "type":"raw"}',\
64+
"Raw output 2 not correct. "
5765

5866

5967
def test_list_data_types():
6068
test = list_data_types()
6169
assert test, "Data types should be listed."
6270

71+
6372
def test_list_operators():
6473
test = list_operators()
6574
assert test, "Operators should be listed."

0 commit comments

Comments
 (0)