You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemml.apache.org by GitBox <gi...@apache.org> on 2020/04/23 12:37:29 UTC

[GitHub] [systemml] Baunsgaard commented on a change in pull request #896: [MINOR] Python Lineage Trace Test Change

Baunsgaard commented on a change in pull request #896:
URL: https://github.com/apache/systemml/pull/896#discussion_r413777910



##########
File path: src/main/python/tests/lineage/test_lineagetrace.py
##########
@@ -0,0 +1,98 @@
+# -------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# -------------------------------------------------------------
+
+import warnings
+import unittest
+import os
+import shutil
+import sys
+import re
+
+path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../")
+sys.path.insert(0, path)
+from systemds.context import SystemDSContext
+
+sds = SystemDSContext()
+
+
+class TestLineageTrace(unittest.TestCase):
+    def setUp(self):
+        warnings.filterwarnings(
+            action="ignore", message="unclosed", category=ResourceWarning
+        )
+
+    def tearDown(self):
+        warnings.filterwarnings(
+            action="ignore", message="unclosed", category=ResourceWarning
+        )
+
+    def test_compare_trace1(self):  # test getLineageTrace() on an intermediate
+        m = sds.full((10, 10), 1)
+        m_res = m + m
+
+        python_trace = [x.strip() for x in m_res.get_lineage_trace().split("\n")]

Review comment:
       Do we really want the trace to be returned as one large string as default, or something like a list?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org