Skip to content

Commit 47d5c31

Browse files
committed
Remove automatic element to string equality check
1 parent b33cf45 commit 47d5c31

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

hyperscript/element.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,4 @@ def _parts(self, remove_empty: bool = False) -> list[str]:
131131
def __eq__(self, other: Any) -> bool:
132132
if isinstance(other, Element):
133133
return str(self) == str(other)
134-
if isinstance(other, str):
135-
return str(self) == other
136134
return False

tests/test_element.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ def test_equality(self) -> None:
8484

8585
self.assertEqual(h("div", h("p", "Foo")), h("div", h("p", "Foo")))
8686

87-
self.assertEqual(h("div", h("p", "Foo")), "<div><p>Foo</p></div>")
88-
8987
self.assertNotEqual(h("div"), h("p"))
9088

9189
self.assertNotEqual(h("div", h("p", "Foo")), h("div", h("p", "Bar")))

0 commit comments

Comments
 (0)