summaryrefslogtreecommitdiffstatshomepage
path: root/tests/bench/var-6.1-instance-attr-5.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bench/var-6.1-instance-attr-5.py')
-rw-r--r--tests/bench/var-6.1-instance-attr-5.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bench/var-6.1-instance-attr-5.py b/tests/bench/var-6.1-instance-attr-5.py
new file mode 100644
index 0000000000..e8d3383605
--- /dev/null
+++ b/tests/bench/var-6.1-instance-attr-5.py
@@ -0,0 +1,18 @@
+import bench
+
+class Foo:
+
+ def __init__(self):
+ self.num1 = 0
+ self.num2 = 0
+ self.num3 = 0
+ self.num4 = 0
+ self.num = 20000000
+
+def test(num):
+ o = Foo()
+ i = 0
+ while i < o.num:
+ i += 1
+
+bench.run(test)