@@ -47,7 +47,7 @@ def test_op(kerngen_path, gen_op_data):
47
47
def test_missing_context (kerngen_path ):
48
48
"""Test kerngen raises an exception when context is not the first line of
49
49
input"""
50
- input_string = "ADD a b c\n CONTEXT BGV 16384 4\n "
50
+ input_string = "ADD a b c\n CONTEXT BGV 16384 4 3 \n "
51
51
result = execute_process (
52
52
[kerngen_path ],
53
53
data_in = input_string ,
@@ -59,7 +59,7 @@ def test_missing_context(kerngen_path):
59
59
60
60
def test_multiple_contexts (kerngen_path ):
61
61
"""Test kerngen raises an exception when more than one context is given"""
62
- input_string = "CONTEXT BGV 16384 4\n Data a 2\n CONTEXT BGV 16384 4\n "
62
+ input_string = "CONTEXT BGV 16384 4 2 \n Data a 2\n CONTEXT BGV 16384 4 2 \n "
63
63
result = execute_process (
64
64
[kerngen_path ],
65
65
data_in = input_string ,
@@ -71,7 +71,7 @@ def test_multiple_contexts(kerngen_path):
71
71
72
72
def test_context_options_without_key (kerngen_path ):
73
73
"""Test kerngen raises an exception when more than one context is given"""
74
- input_string = "CONTEXT BGV 16384 4 1\n Data a 2\n "
74
+ input_string = "CONTEXT BGV 16384 3 2 1\n Data a 2\n "
75
75
result = execute_process (
76
76
[kerngen_path ],
77
77
data_in = input_string ,
@@ -86,7 +86,7 @@ def test_context_options_without_key(kerngen_path):
86
86
87
87
def test_context_unsupported_options_variable (kerngen_path ):
88
88
"""Test kerngen raises an exception when more than one context is given"""
89
- input_string = "CONTEXT BGV 16384 4 test=3\n Data a 2\n "
89
+ input_string = "CONTEXT BGV 16384 3 2 test=3\n Data a 2\n "
90
90
result = execute_process (
91
91
[kerngen_path ],
92
92
data_in = input_string ,
@@ -99,7 +99,7 @@ def test_context_unsupported_options_variable(kerngen_path):
99
99
@pytest .mark .parametrize ("invalid" , [- 1 , 256 , 0.1 , "str" ])
100
100
def test_context_option_invalid_values (kerngen_path , invalid ):
101
101
"""Test kerngen raises an exception if value is out of range for correct key"""
102
- input_string = f"CONTEXT BGV 16384 4 krns_delta={ invalid } \n Data a 2\n "
102
+ input_string = f"CONTEXT BGV 16384 3 2 krns_delta={ invalid } \n Data a 2\n "
103
103
result = execute_process (
104
104
[kerngen_path ],
105
105
data_in = input_string ,
@@ -115,7 +115,7 @@ def test_context_option_invalid_values(kerngen_path, invalid):
115
115
def test_unrecognised_opname (kerngen_path ):
116
116
"""Test kerngen raises an exception when receiving an unrecognised
117
117
opname"""
118
- input_string = "CONTEXT BGV 16384 4 \n OPERATION a b c\n "
118
+ input_string = "CONTEXT BGV 16384 3 2 \n OPERATION a b c\n "
119
119
result = execute_process (
120
120
[kerngen_path ],
121
121
data_in = input_string ,
@@ -129,7 +129,7 @@ def test_unrecognised_opname(kerngen_path):
129
129
130
130
def test_invalid_scheme (kerngen_path ):
131
131
"""Test kerngen raises an exception when receiving an invalid scheme"""
132
- input_string = "CONTEXT SCHEME 16384 4\n ADD a b c\n "
132
+ input_string = "CONTEXT SCHEME 16384 4 3 \n ADD a b c\n "
133
133
result = execute_process (
134
134
[kerngen_path ],
135
135
data_in = input_string ,
@@ -142,7 +142,7 @@ def test_invalid_scheme(kerngen_path):
142
142
@pytest .mark .parametrize ("invalid_poly" , [16000 , 2 ** 12 , 2 ** 13 , 2 ** 18 ])
143
143
def test_invalid_poly_order (kerngen_path , invalid_poly ):
144
144
"""Poly order should be powers of two >= 2^14 and <= 2^17"""
145
- input_string = "CONTEXT BGV " + str (invalid_poly ) + " 4\n ADD a b c\n "
145
+ input_string = "CONTEXT BGV " + str (invalid_poly ) + " 4 3 \n ADD a b c\n "
146
146
result = execute_process (
147
147
[kerngen_path ],
148
148
data_in = input_string ,
@@ -181,7 +181,7 @@ def test_parse_results_multiple_context():
181
181
def fixture_gen_op_data (request ):
182
182
"""Given an op name, return both the input and expected output strings"""
183
183
in_lines = (
184
- "CONTEXT BGV 16384 4" ,
184
+ "CONTEXT BGV 16384 4 3 " ,
185
185
"Data a 2" ,
186
186
"Data b 2" ,
187
187
"Data c 2" ,
0 commit comments