summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sax.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-12 23:11:42 (GMT)
committerFred Drake <fdrake@acm.org>2000-12-12 23:11:42 (GMT)
commit132dce22469f476f399d1bbc6d1cc2f7ba0110cc (patch)
tree4b0988e41b3b7d25d10c2a24fb18b07ff376f66d /Lib/test/test_sax.py
parent63596aeb33c2837d7802449c8906349c9ea1998e (diff)
downloadcpython-132dce22469f476f399d1bbc6d1cc2f7ba0110cc.zip
cpython-132dce22469f476f399d1bbc6d1cc2f7ba0110cc.tar.gz
cpython-132dce22469f476f399d1bbc6d1cc2f7ba0110cc.tar.bz2
Update the code to better reflect recommended style:
Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
Diffstat (limited to 'Lib/test/test_sax.py')
-rw-r--r--Lib/test/test_sax.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index b4c840b..e6f2755 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -395,8 +395,8 @@ def test_expat_locator_noinfo():
parser.feed("</doc>")
parser.close()
- return parser.getSystemId() == None and \
- parser.getPublicId() == None and \
+ return parser.getSystemId() is None and \
+ parser.getPublicId() is None and \
parser.getLineNumber() == 1
def test_expat_locator_withinfo():
@@ -407,7 +407,7 @@ def test_expat_locator_withinfo():
parser.parse(findfile("test.xml"))
return parser.getSystemId() == findfile("test.xml") and \
- parser.getPublicId() == None
+ parser.getPublicId() is None
# ===========================================================================
@@ -484,7 +484,7 @@ def verify_empty_attrs(attrs):
len(attrs) == 0 and \
not attrs.has_key("attr") and \
attrs.keys() == [] and \
- attrs.get("attrs") == None and \
+ attrs.get("attrs") is None and \
attrs.get("attrs", 25) == 25 and \
attrs.items() == [] and \
attrs.values() == [] and \
@@ -552,7 +552,7 @@ def verify_empty_nsattrs(attrs):
len(attrs) == 0 and \
not attrs.has_key((ns_uri, "attr")) and \
attrs.keys() == [] and \
- attrs.get((ns_uri, "attr")) == None and \
+ attrs.get((ns_uri, "attr")) is None and \
attrs.get((ns_uri, "attr"), 25) == 25 and \
attrs.items() == [] and \
attrs.values() == [] and \