summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/struct_value_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/struct_value_runme.py')
-rw-r--r--Examples/test-suite/python/struct_value_runme.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Examples/test-suite/python/struct_value_runme.py b/Examples/test-suite/python/struct_value_runme.py
index aa3ece38c..9fe5c815c 100644
--- a/Examples/test-suite/python/struct_value_runme.py
+++ b/Examples/test-suite/python/struct_value_runme.py
@@ -17,7 +17,7 @@ b.added = 123
if b.added != 123:
raise RuntimeError("Wrong attribute value")
-if not b.__dict__.has_key("added"):
+if "added" not in b.__dict__:
raise RuntimeError("Missing added attribute in __dict__")
@@ -28,7 +28,7 @@ class PyBar(struct_value.Bar):
struct_value.Bar.__init__(self)
pybar = PyBar()
-if not pybar.__dict__.has_key("extra"):
+if "extra" not in pybar.__dict__:
raise RuntimeError("Missing extra attribute in __dict__")
if pybar.extra != "hi":
raise RuntimeError("Incorrect attribute value for extra")