Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalther Neuper <neuper@neuper.(none)>2009-11-25 16:11:14 (GMT)
committer Walther Neuper <neuper@neuper.(none)>2009-11-25 16:11:14 (GMT)
commit47064f92f7974f88e00f3df644f4129228071562 (patch)
tree62357084265c781610920289a5f33f2cd157c67f
parentb33981b375a2e2e39705c942236ec9ae52c9fcf0 (diff)
improved to_str_99;; added RP.tests/extimesdiv/test_
-rw-r--r--ReckonPrimer.tests/exercise/test_to_str_99.py26
-rw-r--r--ReckonPrimer.tests/extimesdiv/test_1_xxx.py35
2 files changed, 61 insertions, 0 deletions
diff --git a/ReckonPrimer.tests/exercise/test_to_str_99.py b/ReckonPrimer.tests/exercise/test_to_str_99.py
new file mode 100644
index 0000000..572adf6
--- /dev/null
+++ b/ReckonPrimer.tests/exercise/test_to_str_99.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# (c) Martin Neppel 2009
+
+print("====================================_____________________=============")
+print("===== ReckonPrimer.tests/addsubsimp/test_to_str_99.py ================")
+
+from functions import to_str_99
+print("----- to_str_99 ------------------------------------------------------")
+
+ls = to_str_99(9)
+print(ls)
+if ls != ['9']:
+ raise Exception()
+
+ls = to_str_99(98)
+print(ls)
+if ls != ['9', '8']:
+ raise Exception()
+
+ls = to_str_99(987654321)
+print(ls)
+if ls != ['9', '8', '7', '6', '5', '4', '3', '2', '1']:
+ raise Exception()
+
+print("===== ReckonPrimer.tests/addsubsimp/test_to_str_99.py ================")
+print("=========================== SUCCESS ~~~~~~~~~~~~~~~~~~~~~ ============")
diff --git a/ReckonPrimer.tests/extimesdiv/test_1_xxx.py b/ReckonPrimer.tests/extimesdiv/test_1_xxx.py
new file mode 100644
index 0000000..0d564d8
--- /dev/null
+++ b/ReckonPrimer.tests/extimesdiv/test_1_xxx.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+# (c) Martin Neppel 2009
+
+print("====================================_____________________=============")
+print("===== ReckonPrimer.tests/addsubsimp/test_1_xxx.py ============")
+
+from extimesdiv import ExTimesDiv
+
+sett = {'topic' : 'times_div',
+ 'calclines' : 1, # no. of lines for calc to be input.
+ 'MAX' : 100, # maximum of calcs generated;
+ # TODO: Generate fills up by varying input.
+ 'MIN' : 10, # minimum of calcs generated 090416WN:UNUSED
+ '*' : True, # eg. 7 . 2 =_
+ '*commute' : False, # commute the operands 2 . 7 = _
+ ':' : False, # 14 : 2 = _
+ 'in' : False, # 2 in 14 = _
+ 'remainder' : False, # : | in ... with remainder
+ 'min' : 2, # +: minimum number in right *operand
+ # -: minimum result
+ 'max' : 2, # +: maximum number in right *operand
+ # -: maximum result
+ 'shuffle_all' : False, # shuffle all calcs
+ 'shuffle_inner': False, # shuffle only 1st (inner) iteration
+ 'cut-max' : True # cut set of all calcs down to MAX
+ }
+ex = ExTimesDiv(None)
+ex.update_setting(sett)
+for _i in range(0, ex.count()):
+ ca = ex.get_next_calc()
+ print(ca)
+
+
+print("===== ReckonPrimer.tests/addsubsimp/test_1_xxx.py ============")
+print("=========================== SUCCESS ~~~~~~~~~~~~~~~~~~~~~ ============")