MCPcopy Index your code
hub / github.com/pyscript/pyscript / test_equality

Method test_equality

core/tests/python/tests/test_web.py:246–262  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

244 ), f"The id of the div should be 'test_selector_w_children_child_1', but got {div.id}"
245
246 def test_equality(self):
247 # GIVEN 2 different Elements pointing to the same underlying element
248 id_ = "test_id_selector"
249 selector = f"#{id_}"
250 div = web.page.find(selector)[0]
251 div2 = web.page.find(selector)[0]
252
253 # EXPECT them to be equal
254 assert div.id == div2.id
255 # EXPECT them to be different objects
256 assert div is not div2
257
258 # EXPECT their value to always be equal
259 assert div.innerHTML == div2.innerHTML
260 div.innerHTML = "some value"
261
262 assert div.innerHTML == div2.innerHTML == "some value"
263
264 def test_append_element(self):
265 id_ = "element-append-tests"

Callers

nothing calls this directly

Calls 1

findMethod · 0.45

Tested by

no test coverage detected