Skip to content

Commit

Permalink
Merge pull request #67 from stchris/equals-tests
Browse files Browse the repository at this point in the history
Added equality tests for #63
  • Loading branch information
stchris authored Nov 18, 2019
2 parents 050c1d4 + f38ffb1 commit f8be900
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 f8be900

Please sign in to comment.