carloea2 commented on code in PR #7260:
URL: https://github.com/apache/texera/pull/7260#discussion_r3723545704
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/figureFactoryTable/FigureFactoryTableOpDescSpec.scala:
##########
@@ -99,4 +99,15 @@ class FigureFactoryTableOpDescSpec extends AnyFlatSpec with
BeforeAndAfter with
assert(carries(code, "col_two"))
code should include("class TableChartOperator(UDFTableOperator)")
}
+
+ it should "define the render_error the empty-table branches call" in {
+ // Both empty-table branches call self.render_error; without the
definition they
+ // raised AttributeError instead of rendering the message.
+ withColumns()
+ val code = opDesc.generatePythonCode()
+ code should include("def render_error(self, error_msg) -> str:")
Review Comment:
These assertions only inspect source text. They do not execute either empty
table branch, so they cannot verify that the branch returns the expected
message or even calls this method successfully. Please run the generated
operator for both empty cases.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]