diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-01-19 00:09:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-01-19 00:09:57 (GMT) |
commit | 577473fe687b38c8f01b0c372d6d2563680045b3 (patch) | |
tree | ee7dc210c7c5281cf07add09a9cb451758e91716 /Lib/test/test_sax.py | |
parent | a69ba65fdce3be6f55634b47cc56cf1f962f6cbc (diff) | |
download | cpython-577473fe687b38c8f01b0c372d6d2563680045b3.zip cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.gz cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.bz2 |
use assert[Not]In where appropriate
A patch from Dave Malcolm.
Diffstat (limited to 'Lib/test/test_sax.py')
-rw-r--r-- | Lib/test/test_sax.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py index a45d1f3..c920ad3 100644 --- a/Lib/test/test_sax.py +++ b/Lib/test/test_sax.py @@ -59,7 +59,7 @@ class XmlTestBase(unittest.TestCase): self.assertEquals(attrs.getNames(), ["attr"]) self.assertEquals(attrs.getQNames(), ["attr"]) self.assertEquals(len(attrs), 1) - self.assertTrue("attr" in attrs) + self.assertIn("attr", attrs) self.assertEquals(list(attrs.keys()), ["attr"]) self.assertEquals(attrs.get("attr"), "val") self.assertEquals(attrs.get("attr", 25), "val") @@ -436,7 +436,7 @@ class ExpatReaderTest(XmlTestBase): self.assertTrue((attrs.getQNames() == [] or attrs.getQNames() == ["ns:attr"])) self.assertEquals(len(attrs), 1) - self.assertTrue((ns_uri, "attr") in attrs) + self.assertIn((ns_uri, "attr"), attrs) self.assertEquals(attrs.get((ns_uri, "attr")), "val") self.assertEquals(attrs.get((ns_uri, "attr"), 25), "val") self.assertEquals(list(attrs.items()), [((ns_uri, "attr"), "val")]) @@ -626,7 +626,7 @@ class XmlReaderTest(XmlTestBase): self.assertEquals(attrs.getNames(), [(ns_uri, "attr")]) self.assertEquals(attrs.getQNames(), ["ns:attr"]) self.assertEquals(len(attrs), 1) - self.assertTrue((ns_uri, "attr") in attrs) + self.assertIn((ns_uri, "attr"), attrs) self.assertEquals(list(attrs.keys()), [(ns_uri, "attr")]) self.assertEquals(attrs.get((ns_uri, "attr")), "val") self.assertEquals(attrs.get((ns_uri, "attr"), 25), "val") |