diff options
author | Michael Haberler <git@mah.priv.at> | 2012-02-29 09:31:26 +0100 |
---|---|---|
committer | Michael Haberler <git@mah.priv.at> | 2012-02-29 09:58:06 +0100 |
commit | 28cc7aacefec7c41b8ccfb351f3cb73d77af06e8 (patch) | |
tree | b3b0a6a0ea43e3184aefafd1e85da47d423212cc | |
parent | e9f14654cb1c2f6b4990f2047331e401cbd62f7a (diff) | |
download | linuxcnc-28cc7aacefec7c41b8ccfb351f3cb73d77af06e8.tar.gz linuxcnc-28cc7aacefec7c41b8ccfb351f3cb73d77af06e8.zip |
tests/python-self: extend test to cover 'self' passed to __init__()
-rw-r--r-- | tests/interp/python-self/oword.py | 2 | ||||
-rw-r--r-- | tests/interp/python-self/subs.py | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/interp/python-self/oword.py b/tests/interp/python-self/oword.py index d1f7522c5..a23d5c538 100644 --- a/tests/interp/python-self/oword.py +++ b/tests/interp/python-self/oword.py @@ -13,5 +13,5 @@ def checkparam1_retained(self): if hasattr(interpreter,'this'): print "this == self:", self == interpreter.this else: - print "module interprerter: no 'this' attribute" + print "module interpreter: no 'this' attribute" diff --git a/tests/interp/python-self/subs.py b/tests/interp/python-self/subs.py index 53ccf7c55..0468ee3ab 100644 --- a/tests/interp/python-self/subs.py +++ b/tests/interp/python-self/subs.py @@ -1 +1,10 @@ import oword +import interpreter + +def __init__(self): + if hasattr(interpreter,'this'): + if self != interpreter.this: + print "__init__: self != this" + else: + print "__init__: no 'this' attribute" + |