Skip to content

Commit

Permalink
Added equality tests for #63
Browse files Browse the repository at this point in the history
  • Loading branch information
stchris committed Nov 18, 2019
1 parent 050c1d4 commit f38ffb1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,21 @@ def test_invalid_external_dtd(self):
untangle.parse(self.bad_dtd_xml, feature_external_ges=True)


class TestEquals(unittest.TestCase):

def test_equals(self):
a = untangle.Element('a', '1')
b = untangle.Element('b', '1')
self.assertTrue(a == b)

def test_list_equals(self):
a = untangle.Element('a', '1')
b = untangle.Element('b', '1')
listA = [a, b]
c = untangle.Element('c', '1')
self.assertTrue(c in listA)


if __name__ == "__main__":
unittest.main()

Expand Down

0 comments on commit f38ffb1

Please sign in to comment.