summaryrefslogtreecommitdiff
path: root/mlir/test/python
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2025-02-10 09:09:58 +0100
committerGitHub <noreply@github.com>2025-02-10 09:09:58 +0100
commit67b7a2590f39ad9ff5413adb9af162220972833e (patch)
tree5d469be4a3698a192eb9b3dc68be973cfad6eb7e /mlir/test/python
parent30e7c101465d5fa4e9266b9ae3b238eb8cf4533b (diff)
Revert "[mlir] Python: Parse ModuleOp from file path" (#126482)
Reverts llvm/llvm-project#125736 The gcc7 Bot is broken at the moment.
Diffstat (limited to 'mlir/test/python')
-rw-r--r--mlir/test/python/ir/module.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/mlir/test/python/ir/module.py b/mlir/test/python/ir/module.py
index 441916b38ee7..ecafcb46af21 100644
--- a/mlir/test/python/ir/module.py
+++ b/mlir/test/python/ir/module.py
@@ -1,8 +1,6 @@
# RUN: %PYTHON %s | FileCheck %s
import gc
-from pathlib import Path
-from tempfile import NamedTemporaryFile
from mlir.ir import *
@@ -29,24 +27,6 @@ def testParseSuccess():
print(str(module))
-# Verify successful parse from file.
-# CHECK-LABEL: TEST: testParseFromFileSuccess
-# CHECK: module @successfulParse
-@run
-def testParseFromFileSuccess():
- ctx = Context()
- with NamedTemporaryFile(mode="w") as tmp_file:
- tmp_file.write(r"""module @successfulParse {}""")
- tmp_file.flush()
- module = Module.parse(Path(tmp_file.name), ctx)
- assert module.context is ctx
- print("CLEAR CONTEXT")
- ctx = None # Ensure that module captures the context.
- gc.collect()
- module.operation.verify()
- print(str(module))
-
-
# Verify parse error.
# CHECK-LABEL: TEST: testParseError
# CHECK: testParseError: <