fix(python): add missing import

Also added a test to catch future similar failure. Mainly, we didn't
have tests that imported and used the HLFHE dialect from the python
bindings
This commit is contained in:
youben11
2021-10-08 13:57:51 +01:00
committed by Ayoub Benaissa
parent 86c127d198
commit 5a308ddc75
2 changed files with 11 additions and 1 deletions

View File

@@ -1,2 +1,2 @@
# We need this helpers from the mlir bindings, they are used in the generated files
from mlir.dialects._ods_common import _cext, segmented_accessor, equally_sized_accessor, extend_opview_class, get_default_loc_context
from mlir.dialects._ods_common import _cext, segmented_accessor, equally_sized_accessor, extend_opview_class, get_default_loc_context, get_op_result_or_value, get_op_results_or_values

View File

@@ -0,0 +1,10 @@
from mlir.ir import Context
from zamalang import register_dialects
from zamalang.dialects import hlfhe
def test_eint():
ctx = Context()
register_dialects(ctx)
eint = hlfhe.EncryptedIntegerType.get(ctx, 6)
assert eint.__str__() == "!HLFHE.eint<6>"