|
@@ -96,8 +96,7 @@ Gui.add_library(MyLibrary())
|
|
|
|
|
|
def test_lib_input_md(gui: Gui, test_client, helpers):
|
|
def test_lib_input_md(gui: Gui, test_client, helpers):
|
|
val = "" # noqa: F841
|
|
val = "" # noqa: F841
|
|
- if frame := inspect.currentframe():
|
|
|
|
- gui._set_frame(frame)
|
|
|
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
md_string = "<|{val}|test_lib.testinput|multiline|>"
|
|
md_string = "<|{val}|test_lib.testinput|multiline|>"
|
|
expected_list = [
|
|
expected_list = [
|
|
"<TestLib_Input",
|
|
"<TestLib_Input",
|
|
@@ -112,8 +111,7 @@ def test_lib_input_md(gui: Gui, test_client, helpers):
|
|
|
|
|
|
def test_lib_xhtml_md(gui: Gui, test_client, helpers):
|
|
def test_lib_xhtml_md(gui: Gui, test_client, helpers):
|
|
val = "title" # noqa: F841
|
|
val = "title" # noqa: F841
|
|
- if frame := inspect.currentframe():
|
|
|
|
- gui._set_frame(frame)
|
|
|
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
md_string = "<|{val}|test_lib.title|>"
|
|
md_string = "<|{val}|test_lib.title|>"
|
|
expected = [f"<h1>{val}</h1>"]
|
|
expected = [f"<h1>{val}</h1>"]
|
|
helpers.test_control_md(gui, md_string, expected)
|
|
helpers.test_control_md(gui, md_string, expected)
|
|
@@ -121,8 +119,7 @@ def test_lib_xhtml_md(gui: Gui, test_client, helpers):
|
|
|
|
|
|
def test_lib_xhtml_fail_md(gui: Gui, test_client, helpers):
|
|
def test_lib_xhtml_fail_md(gui: Gui, test_client, helpers):
|
|
val = "title" # noqa: F841
|
|
val = "title" # noqa: F841
|
|
- if frame := inspect.currentframe():
|
|
|
|
- gui._set_frame(frame)
|
|
|
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
md_string = "<|{val}|test_lib.title_fail|>"
|
|
md_string = "<|{val}|test_lib.title_fail|>"
|
|
expected = ["title_fail.render_xhtml() did not return a valid XHTML string. unclosed token: line 1, column 9"]
|
|
expected = ["title_fail.render_xhtml() did not return a valid XHTML string. unclosed token: line 1, column 9"]
|
|
helpers.test_control_md(gui, md_string, expected)
|
|
helpers.test_control_md(gui, md_string, expected)
|
|
@@ -130,8 +127,7 @@ def test_lib_xhtml_fail_md(gui: Gui, test_client, helpers):
|
|
|
|
|
|
def test_lib_input_html_1(gui: Gui, test_client, helpers):
|
|
def test_lib_input_html_1(gui: Gui, test_client, helpers):
|
|
val = "" # noqa: F841
|
|
val = "" # noqa: F841
|
|
- if frame := inspect.currentframe():
|
|
|
|
- gui._set_frame(frame)
|
|
|
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
html_string = '<test_lib:testinput value="{val}" multiline="true" />'
|
|
html_string = '<test_lib:testinput value="{val}" multiline="true" />'
|
|
expected_list = [
|
|
expected_list = [
|
|
"<TestLib_Input",
|
|
"<TestLib_Input",
|
|
@@ -146,8 +142,7 @@ def test_lib_input_html_1(gui: Gui, test_client, helpers):
|
|
|
|
|
|
def test_lib_input_html_2(gui: Gui, test_client, helpers):
|
|
def test_lib_input_html_2(gui: Gui, test_client, helpers):
|
|
val = "" # noqa: F841
|
|
val = "" # noqa: F841
|
|
- if frame := inspect.currentframe():
|
|
|
|
- gui._set_frame(frame)
|
|
|
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
html_string = '<test_lib:testinput multiline="true">{val}</test_lib:testinput>'
|
|
html_string = '<test_lib:testinput multiline="true">{val}</test_lib:testinput>'
|
|
expected_list = [
|
|
expected_list = [
|
|
"<TestLib_Input",
|
|
"<TestLib_Input",
|
|
@@ -162,8 +157,7 @@ def test_lib_input_html_2(gui: Gui, test_client, helpers):
|
|
|
|
|
|
def test_lib_inner_md(gui: Gui, test_client, helpers):
|
|
def test_lib_inner_md(gui: Gui, test_client, helpers):
|
|
val = "title" # noqa: F841
|
|
val = "title" # noqa: F841
|
|
- if frame := inspect.currentframe():
|
|
|
|
- gui._set_frame(frame)
|
|
|
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
md_string = "<|{val}|test_lib.inner|>"
|
|
md_string = "<|{val}|test_lib.inner|>"
|
|
expected = [
|
|
expected = [
|
|
"<TestLib_Inner",
|
|
"<TestLib_Inner",
|
|
@@ -174,8 +168,7 @@ def test_lib_inner_md(gui: Gui, test_client, helpers):
|
|
|
|
|
|
|
|
|
|
def test_lib_inner_no_value_md(gui: Gui, test_client, helpers):
|
|
def test_lib_inner_no_value_md(gui: Gui, test_client, helpers):
|
|
- if frame := inspect.currentframe():
|
|
|
|
- gui._set_frame(frame)
|
|
|
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
md_string = "<|test_lib.inner|>"
|
|
md_string = "<|test_lib.inner|>"
|
|
expected = ["<TestLib_Inner", "withProperty={tpec_TpExPr_None_TPMDL_0}"]
|
|
expected = ["<TestLib_Inner", "withProperty={tpec_TpExPr_None_TPMDL_0}"]
|
|
helpers.test_control_md(gui, md_string, expected)
|
|
helpers.test_control_md(gui, md_string, expected)
|