Implemented Delete feature in DataGridsManager.py. There is still a bug as DBEngine.delete is not implemented

Improved readability for tests using matcher
This commit is contained in:
2026-02-21 18:31:11 +01:00
parent 730f55d65b
commit d447220eae
12 changed files with 460 additions and 49 deletions

View File

@@ -351,6 +351,7 @@ class TestErrorComparisonOutput:
res = comparison_out.render()
assert "\n" + res == '''
===== Actual ====== | ==== Expected =====
(div "attr1"="value1" | (div "attr1"="value1"
(p "id"="p_id") | (p "id"="p_id")
) | )'''
@@ -366,6 +367,7 @@ class TestErrorComparisonOutput:
res = comparison_out.render()
assert "\n" + res == '''
======= Actual ======== | ====== Expected =======
(div "id"="div_id" ... | (div "id"="div_id" ...
(span "class"="cls" ... | (span "class"="cls" ...
(div "attr1"="value1" | (div "attr1"="value1"
@@ -383,6 +385,7 @@ class TestErrorComparisonOutput:
res = comparison_out.render()
assert "\n" + res == '''
========= Actual ========= | ==== Expected =====
(div "attr2"="** MISSING **" | (div "attr2"="value1"
^^^^^^^^^^^^^^^^^^^^^^^ |
(p "id"="p_id") | (p "id"="p_id")
@@ -399,6 +402,7 @@ class TestErrorComparisonOutput:
res = comparison_out.render()
assert "\n" + res == '''
===== Actual ====== | ==== Expected =====
(div "attr1"="value2" | (div "attr1"="value1"
^^^^^^^^^^^^^^^^ |
(p "id"="p_id") | (p "id"="p_id")
@@ -415,6 +419,7 @@ class TestErrorComparisonOutput:
res = comparison_out.render()
assert "\n" + res == '''
===== Actual ====== | ==== Expected =====
(div "attr1"="value1" | (div "attr1"="value1"
(p "id"="p_id") | (span "id"="s_id")
^ ^^^^^^^^^^^ |
@@ -432,6 +437,7 @@ class TestErrorComparisonOutput:
assert "\n" + debug_output == """
Path : 'div'
Error : The condition 'Contains(value2)' is not satisfied.
====== Actual ====== | ========== Expected ==========
(div "attr1"="value1") | (div "attr1"="Contains(value2)")
^^^^^^^^^^^^^^^^ |"""
@@ -447,6 +453,7 @@ Error : The condition 'Contains(value2)' is not satisfied.
res = comparison_out.render()
assert "\n" + res == '''
============= Actual ============= | ============= Expected =============
(div "attr1"="123" "attr2"="value2") | (Dummy "attr1"="123" "attr2"="value2")
^^^ |'''