diff --git a/python/npcomp/dialect/Basicpy.py b/python/npcomp/dialect/Basicpy.py index eed2b574a..ad709a874 100644 --- a/python/npcomp/dialect/Basicpy.py +++ b/python/npcomp/dialect/Basicpy.py @@ -17,25 +17,25 @@ class DialectHelper(_BaseDialectHelper): >>> h = DialectHelper(c) Dialect Types: - >>> h.basicpy_None_type + >>> h.basicpy_NoneType !basicpy.NoneType - >>> h.basicpy_Ellipsis_type + >>> h.basicpy_EllipsisType !basicpy.EllipsisType >>> h.basicpy_SlotObject_type( - ... "foobar", h.basicpy_None_type, h.basicpy_None_type) + ... "foobar", h.basicpy_NoneType, h.basicpy_NoneType) !basicpy.SlotObject singleton op: >>> m = c.new_module() >>> h.builder.insert_block_start(m.first_block) - >>> _ = h.basicpy_singleton_op(h.basicpy_None_type) + >>> _ = h.basicpy_singleton_op(h.basicpy_NoneType) >>> m.to_asm().strip() 'module {\n %0 = basicpy.singleton : !basicpy.NoneType\n}' slot_object ops: >>> m = c.new_module() >>> h.builder.insert_block_start(m.first_block) - >>> v0 = h.basicpy_singleton_op(h.basicpy_None_type).result + >>> v0 = h.basicpy_singleton_op(h.basicpy_NoneType).result >>> slot_object = h.basicpy_slot_object_make_op("foobar", v0, v0).result >>> _ = h.basicpy_slot_object_get_op(slot_object, 0) >>> print(m.to_asm().strip()) diff --git a/python/npcomp/npcomp_dialect.cpp b/python/npcomp/npcomp_dialect.cpp index 4aebc7016..1578a4b26 100644 --- a/python/npcomp/npcomp_dialect.cpp +++ b/python/npcomp/npcomp_dialect.cpp @@ -21,12 +21,12 @@ public: static void bind(py::module m) { py::class_(m, "BasicpyDialectHelper") .def(py::init>()) - .def_property_readonly("basicpy_None_type", + .def_property_readonly("basicpy_NoneType", [](BasicpyDialectHelper &self) -> PyType { return Basicpy::NoneType::get( &self.context->context); }) - .def_property_readonly("basicpy_Ellipsis_type", + .def_property_readonly("basicpy_EllipsisType", [](BasicpyDialectHelper &self) -> PyType { return Basicpy::EllipsisType::get( &self.context->context); diff --git a/python/run_tests.py b/python/run_tests.py index ed25e0339..26df51d6e 100755 --- a/python/run_tests.py +++ b/python/run_tests.py @@ -7,6 +7,7 @@ import sys TEST_MODULES = ( "npcomp.mlir_ir_test", + "npcomp.dialect.Basicpy", "npcomp.dialect.Numpy", "npcomp.tracing.context", "npcomp.tracing.mlir_trace",