Commits

Richard Shea committed ed4daf8

Fixups after move of MishMash down a level and move of tests out into their own dedicated directory. After these changes : all the unit tests run successfully; and diagnostic.py will run.

Comments (0)

Files changed (40)

+glob:VWSUMATTDump.txt
+glob:ATTDumpFromInsertAttempts.txt
+glob:Diag98.txt
+glob:Diag999.txt
+glob:SUMDumpFromInsertAttempts.txt
+glob:SUMDumpFromInsertSums.txt
               None,
               1,
               0)},
-                     loc('MathsMish-Test.py'): {91: (0,
+                     loc('MathsMish/__init__.py'): {1: (0,
         None,
         1,
         0)},
-                     loc('Question-Test.py'): {27: (0,
+                     loc('MathsMish/diagnostic.py'): {1: (0,
         None,
         1,
         0)},
               None,
               0,
               0)},
-                     loc('diagnostic.py'): {29: (0,
-        None,
-        1,
-        0)},
                      loc('mmdb/BusinessObject/Attempt.py'): {7: (0,
         None,
         0,
         'type': 'dock',
         'view': {'area': 'tall',
                  'constraint': None,
-                 'current_pages': [6],
+                 'current_pages': [1],
                  'notebook_display': 'normal',
-                 'notebook_percent': 0.28858350951374212,
+                 'notebook_percent': 0.32498042286609241,
                  'override_title': None,
                  'pagelist': [('debug-stack',
                                'tall',
         'tree-states': {'deep': {'column-widths': [1.0],
                                  'expanded-nodes': [(0,),
         (0,
-         1)],
-                                 'selected-nodes': [(0,
-        1,
-        2)],
+         0)],
+                                 'selected-nodes': [],
                                  'top-node': (0,)}},
         'tree-style': 'deep'}}),
                               ('refactoring',
         'top-node': (0,)}})],
                  'primary_view_state': {'area': 'wide',
         'constraint': None,
-        'current_pages': [7,
+        'current_pages': [2,
                           2],
         'notebook_display': 'normal',
-        'notebook_percent': 0.28295454545454546,
+        'notebook_percent': 0.5,
         'override_title': None,
         'pagelist': [('bookmarks',
                       'wide',
         'print SELECTATTWHENMOSTRECENTRESULTSUCCESSFUL\x0d\n',
         'import pprint\x0d\n',
         'dir(conn)\x0d\n']},
-                       'sel-line': 7,
-                       'sel-line-start': 296,
-                       'selection_end': 300,
-                       'selection_start': 300}),
+                       'sel-line': 2,
+                       'sel-line-start': 148,
+                       'selection_end': 152,
+                       'selection_start': 152}),
                      ('interactive-search',
                       'wide',
                       0,
                       'wide',
                       1,
                       {'node-states': [],
-                       'tree-state': {'column-widths': [0.39803921568627448,
-        0.60196078431372546],
+                       'tree-state': {'column-widths': [0.38198198198198197,
+        0.61801801801801803],
                                       'expanded-nodes': [],
                                       'selected-nodes': [],
                                       'top-node': (0,)}})],
-        'primary_view_state': {'editor_states': {'bookmarks': ([(loc('QuestionMachine.py'),
-        {'attrib-starts': [('QuestionMachine',
-                            19),
-                           ('QuestionMachine.__getNextQuestionWeighted',
-                            312)],
-         'first-line': 372,
+        'primary_view_state': {'editor_states': {'bookmarks': ([(loc('MathsMish/MathsMish.py'),
+        {'attrib-starts': [],
+         'first-line': 0,
          'folded-linenos': [],
-         'sel-line': 377,
-         'sel-line-start': 14359,
-         'selection_end': 14359,
-         'selection_start': 14359},
-        1329553602.4289999),
-        (loc('mmdb/DataAccess/AttemptDB.py'),
-         {'attrib-starts': [('AttemptDB',
-                             160),
-                            ('AttemptDB.Insert',
-                             195)],
-          'first-line': 192,
-          'folded-linenos': [],
-          'sel-line': 199,
-          'sel-line-start': 5559,
-          'selection_end': 5597,
-          'selection_start': 5597},
-         1329553608.951),
-        (loc('diagnostic.py'),
+         'sel-line': 9,
+         'sel-line-start': 230,
+         'selection_end': 230,
+         'selection_start': 230},
+        1329905428.8929999),
+        (loc('MathsMish/MathsMish.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 8,
-          'sel-line-start': 208,
-          'selection_end': 208,
-          'selection_start': 208},
-         1329553626.0179999),
-        (loc('diagnostic.py'),
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 230,
+          'selection_start': 230},
+         1329905445.902),
+        (loc('MathsMish/mmdb/BusinessLogic/__init__.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 8,
-          'sel-line-start': 208,
-          'selection_end': 208,
-          'selection_start': 208},
-         1329553635.02),
-        (loc('mmdb/BusinessObject/Attempt.py'),
-         {'attrib-starts': [('Attempt',
-                             3),
-                            ('Attempt.getplayer',
-                             17)],
-          'first-line': 0,
-          'folded-linenos': [],
-          'sel-line': 18,
-          'sel-line-start': 655,
-          'selection_end': 655,
-          'selection_start': 655},
-         1329553637.6989999),
-        (loc('mmdb/BusinessObject/Attempt.py'),
-         {'attrib-starts': [('Attempt',
-                             3),
-                            ('Attempt.getplayer',
-                             17)],
-          'first-line': 0,
-          'folded-linenos': [],
-          'sel-line': 18,
-          'sel-line-start': 655,
-          'selection_end': 655,
-          'selection_start': 655},
-         1329553640.816),
-        (loc('mmdb/BusinessObject/Attempt.py'),
-         {'attrib-starts': [('Attempt',
-                             3),
-                            ('Attempt.__init__',
-                             4)],
-          'first-line': 0,
-          'folded-linenos': [],
-          'sel-line': 5,
-          'sel-line-start': 282,
-          'selection_end': 289,
-          'selection_start': 289},
-         1329553641.0639999),
-        (loc('diagnostic.py'),
+          'sel-line': 0,
+          'sel-line-start': 0,
+          'selection_end': 0,
+          'selection_start': 0},
+         1329905489.9089999),
+        (loc('MathsMish/MathsMish.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 8,
-          'sel-line-start': 208,
-          'selection_end': 208,
-          'selection_start': 208},
-         1329553653.526),
-        (loc('diagnostic.py'),
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 230,
+          'selection_start': 230},
+         1329905493.934),
+        (loc('MathsMish/MathsMish.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 8,
-          'sel-line-start': 208,
-          'selection_end': 208,
-          'selection_start': 208},
-         1329553662.7490001),
-        (loc('mmdb/DataAccess/AttemptDB.py'),
-         {'attrib-starts': [('AttemptDB',
-                             160),
-                            ('AttemptDB.Insert',
-                             195)],
-          'first-line': 186,
-          'folded-linenos': [],
-          'sel-line': 197,
-          'sel-line-start': 5476,
-          'selection_end': 5490,
-          'selection_start': 5490},
-         1329553667.1400001),
-        (loc('diagnostic.py'),
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 230,
+          'selection_start': 230},
+         1329905498.4400001),
+        (loc('MathsMish/mmdb/BusinessLogic/AttemptManager.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 8,
-          'sel-line-start': 208,
-          'selection_end': 208,
-          'selection_start': 208},
-         1329553717.3570001),
-        (loc('mmdb/DataAccess/AttemptDB.py'),
-         {'attrib-starts': [('AttemptDB',
-                             160),
-                            ('AttemptDB.Insert',
-                             195)],
-          'first-line': 186,
-          'folded-linenos': [],
-          'sel-line': 208,
-          'sel-line-start': 5775,
-          'selection_end': 5821,
-          'selection_start': 5821},
-         1329553720.559),
-        (loc('diagnostic.py'),
+          'sel-line': 0,
+          'sel-line-start': 0,
+          'selection_end': 0,
+          'selection_start': 0},
+         1329905508.79),
+        (loc('MathsMish/mmdb/BusinessLogic/QuestionManager.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 8,
-          'sel-line-start': 208,
-          'selection_end': 208,
-          'selection_start': 208},
-         1329553803.721),
-        (loc('mmdb/DataAccess/AttemptDB.py'),
-         {'attrib-starts': [('AttemptDB',
-                             160),
-                            ('AttemptDB.Insert',
-                             195)],
-          'first-line': 186,
-          'folded-linenos': [],
-          'sel-line': 197,
-          'sel-line-start': 5476,
-          'selection_end': 5476,
-          'selection_start': 5476},
-         1329553813.855),
-        (loc('mmdb/DataAccess/AttemptDB.py'),
-         {'attrib-starts': [('AttemptDB',
-                             160),
-                            ('AttemptDB.Insert',
-                             195)],
-          'first-line': 186,
-          'folded-linenos': [],
-          'sel-line': 197,
-          'sel-line-start': 5476,
-          'selection_end': 5476,
-          'selection_start': 5476},
-         1329553824.8829999),
-        (loc('diagnostic.py'),
+          'sel-line': 0,
+          'sel-line-start': 0,
+          'selection_end': 0,
+          'selection_start': 0},
+         1329905515.7750001),
+        (loc('MathsMish/mmdb/BusinessLogic/AttemptManager.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 28,
-          'sel-line-start': 997,
-          'selection_end': 1015,
-          'selection_start': 1015},
-         1329553848.6619999),
-        (loc('diagnostic.py'),
+          'sel-line': 0,
+          'sel-line-start': 0,
+          'selection_end': 0,
+          'selection_start': 0},
+         1329905518.1340001),
+        (loc('MathsMish/mmdb/BusinessLogic/SumManager.py'),
          {'attrib-starts': [],
           'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 28,
-          'sel-line-start': 997,
-          'selection_end': 997,
-          'selection_start': 997},
-         1329553868.7360001),
-        (loc('../../../../../../bin/installed/Wing IDE 4.0/resources/doc/en/TOC.idx'),
-         {'displayed-index': 230,
-          'viewer-state': {'history': [-1,
-                                       230],
-                           'history-pos': 1,
-                           'index': 230,
-                           'top': (0,
-                                   0)}},
-         1329615219.4530001),
-        (loc('MathsMish-Test.py'),
-         {'attrib-starts': [('MarkAnswerTests',
-                             79),
-                            ('MarkAnswerTests.testExceptionWhenNoAnswerSuppl'\
-                             'ied',
-                             88)],
-          'first-line': 75,
+          'sel-line': 0,
+          'sel-line-start': 0,
+          'selection_end': 0,
+          'selection_start': 0},
+         1329905523.5050001),
+        (loc('MathsMish/mmdb/BusinessLogic/__init__.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 90,
-          'sel-line-start': 3173,
-          'selection_end': 3173,
-          'selection_start': 3173},
-         1329615243.595),
-        [loc('Question-Test.py'),
-         {'attrib-starts': [('QuestionTests',
-                             20),
-                            ('QuestionTests.testQuestionLHSInitialisation',
-                             26)],
-          'first-line': 6,
+          'sel-line': 0,
+          'sel-line-start': 0,
+          'selection_end': 0,
+          'selection_start': 0},
+         1329905529.013),
+        (loc('MathsMish/diagnostic.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
           'folded-linenos': [],
-          'sel-line': 28,
-          'sel-line-start': 1031,
-          'selection_end': 1036,
-          'selection_start': 1036},
-         1329615345.079]],
+          'sel-line': 1,
+          'sel-line-start': 15,
+          'selection_end': 15,
+          'selection_start': 15},
+         1329905541.6199999),
+        (loc('MathsMish/MathsMish.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 230,
+          'selection_start': 230},
+         1329905550.6989999),
+        (loc('MathsMish/diagnostic.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 1,
+          'sel-line-start': 15,
+          'selection_end': 15,
+          'selection_start': 15},
+         1329905552.4979999),
+        (loc('MathsMish/MathsMish.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 230,
+          'selection_start': 230},
+         1329905554.427),
+        (loc('MathsMish/diagnostic.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 1,
+          'sel-line-start': 15,
+          'selection_end': 15,
+          'selection_start': 15},
+         1329905558.6659999),
+        (loc('MathsMish/MathsMish.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 230,
+          'selection_start': 230},
+         1329905567.1300001),
+        (loc('MathsMish/diagnostic.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 1,
+          'sel-line-start': 15,
+          'selection_end': 15,
+          'selection_start': 15},
+         1329905569.5610001),
+        (loc('MathsMish/MathsMish.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 289,
+          'selection_start': 289},
+         1329905788.47),
+        (loc('MathsMish/diagnostic.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 1,
+          'sel-line-start': 15,
+          'selection_end': 15,
+          'selection_start': 15},
+         1329905840.4979999),
+        [loc('MathsMish/MathsMish.py'),
+         {'attrib-starts': [],
+          'first-line': 0,
+          'folded-linenos': [],
+          'sel-line': 9,
+          'sel-line-start': 230,
+          'selection_end': 289,
+          'selection_start': 289},
+         1329905843.8499999]],
         19),
-        'current-loc': loc('Question-Test.py'),
-        'editor-states': {loc('../../../../../../bin/installed/Wing IDE 4.0/resources/doc/en/TOC.idx'): {''\
-        'displayed-index': 230,
-        'viewer-state': {'history': [-1,
-                                     230],
-                         'history-pos': 1,
-                         'index': 230,
-                         'top': (0,
-                                 0)}},
-                          loc('MathsMish-Test.py'): {'attrib-starts': [('Mar'\
-        'kAnswerTests',
-        79),
-        ('MarkAnswerTests.testExceptionWhenNoAnswerSupplied',
-         88)],
-        'first-line': 75,
-        'folded-linenos': [],
-        'sel-line': 90,
-        'sel-line-start': 3173,
-        'selection_end': 3173,
-        'selection_start': 3173},
-                          loc('MathsMish.py'): {'attrib-starts': [('MarkAnsw'\
-        'er',
-        30)],
-        'first-line': 13,
-        'folded-linenos': [],
-        'sel-line': 30,
-        'sel-line-start': 700,
-        'selection_end': 714,
-        'selection_start': 704},
-                          loc('Question-Test.py'): {'attrib-starts': [('Ques'\
-        'tionTests',
-        20),
-        ('QuestionTests.testQuestionLHSInitialisation',
-         26)],
-        'first-line': 6,
-        'folded-linenos': [],
-        'sel-line': 29,
-        'sel-line-start': 1101,
-        'selection_end': 1104,
-        'selection_start': 1104},
-                          loc('QuestionMachine.py'): {'attrib-starts': [('Qu'\
-        'estionMachine',
-        19),
-        ('QuestionMachine.__getNextQuestionWeighted',
-         312)],
-        'first-line': 372,
-        'folded-linenos': [],
-        'sel-line': 377,
-        'sel-line-start': 14359,
-        'selection_end': 14359,
-        'selection_start': 14359},
-                          loc('diagnostic.py'): {'attrib-starts': [],
+        'current-loc': loc('MathsMish/MathsMish.py'),
+        'editor-states': {loc('MathsMish/MMDBExceptions.py'): {'attrib-start'\
+        's': [('MathsMishError',
+               0)],
         'first-line': 0,
         'folded-linenos': [],
-        'sel-line': 28,
-        'sel-line-start': 997,
-        'selection_end': 997,
-        'selection_start': 997},
-                          loc('mmdb/BusinessLogic/AttemptManager.py'): {'att'\
-        'rib-starts': [('AttemptManager',
-                        3),
-                       ('AttemptManager.GetAllWithAttemptDetailsForUser',
-                        92)],
-        'first-line': 65,
-        'folded-linenos': [],
-        'sel-line': 93,
-        'sel-line-start': 2667,
-        'selection_end': 2667,
-        'selection_start': 2667},
-                          loc('mmdb/BusinessLogic/SumManager.py'): {'attrib-'\
-        'starts': [('SumManager',
-                    1),
-                   ('SumManager.__init__',
-                    3)],
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0},
+                          loc('MathsMish/MathsMish.py'): {'attrib-starts': [],
         'first-line': 0,
         'folded-linenos': [],
-        'sel-line': 6,
-        'sel-line-start': 186,
-        'selection_end': 186,
-        'selection_start': 186},
-                          loc('mmdb/BusinessObject/Attempt.py'): {'attrib-st'\
-        'arts': [('Attempt',
-                  3),
-                 ('Attempt.__init__',
-                  4)],
+        'sel-line': 9,
+        'sel-line-start': 230,
+        'selection_end': 289,
+        'selection_start': 289},
+                          loc('MathsMish/QuestionMachine.py'): {'attrib-star'\
+        'ts': [],
         'first-line': 0,
         'folded-linenos': [],
-        'sel-line': 5,
-        'sel-line-start': 282,
-        'selection_end': 289,
-        'selection_start': 289},
-                          loc('mmdb/BusinessObject/Question.py'): {'attrib-s'\
-        'tarts': [('Question',
-                   3),
-                  ('Question.goodAnswer',
-                   57)],
-        'first-line': 46,
+        'sel-line': 1,
+        'sel-line-start': 41,
+        'selection_end': 41,
+        'selection_start': 41},
+                          loc('MathsMish/__init__.py'): {'attrib-starts': [],
+        'first-line': 0,
         'folded-linenos': [],
-        'sel-line': 68,
-        'sel-line-start': 2012,
-        'selection_end': 2012,
-        'selection_start': 2012},
-                          loc('mmdb/BusinessObject/Sum.py'): {'attrib-starts': [(''\
-        'Sum',
-        0),
-        ('Sum.getCorrectAnswer',
-         42)],
-        'first-line': 19,
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 34,
+        'selection_start': 34},
+                          loc('MathsMish/diagnostic.py'): {'attrib-starts': [],
+        'first-line': 0,
         'folded-linenos': [],
-        'sel-line': 42,
-        'sel-line-start': 1017,
-        'selection_end': 1025,
-        'selection_start': 1025},
-                          loc('mmdb/DataAccess/AttemptDB.py'): {'attrib-star'\
-        'ts': [('AttemptDB',
-                160),
-               ('AttemptDB.Insert',
-                195)],
-        'first-line': 186,
+        'sel-line': 1,
+        'sel-line-start': 15,
+        'selection_end': 15,
+        'selection_start': 15},
+                          loc('MathsMish/mmdb/BusinessLogic/AttemptManager.py'): {''\
+        'attrib-starts': [],
+        'first-line': 0,
         'folded-linenos': [],
-        'sel-line': 197,
-        'sel-line-start': 5476,
-        'selection_end': 5476,
-        'selection_start': 5476},
-                          loc('mmdb/DataAccess/SumDB.py'): {'attrib-starts': [],
-        'first-line': 7,
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0},
+                          loc('MathsMish/mmdb/BusinessLogic/QuestionManager.py'): {''\
+        'attrib-starts': [],
+        'first-line': 0,
         'folded-linenos': [],
-        'sel-line': 14,
-        'sel-line-start': 687,
-        'selection_end': 687,
-        'selection_start': 687}},
-        'has-focus': True},
-                               'open_files': [u'MathsMish.py',
-        u'QuestionMachine.py',
-        u'mmdb/BusinessLogic/AttemptManager.py',
-        u'mmdb/BusinessLogic/SumManager.py',
-        u'mmdb/BusinessObject/Attempt.py',
-        u'mmdb/BusinessObject/Question.py',
-        u'mmdb/BusinessObject/Sum.py',
-        u'mmdb/DataAccess/AttemptDB.py',
-        u'mmdb/DataAccess/SumDB.py',
-        u'diagnostic.py',
-        u'../../../../../../bin/installed/Wing IDE 4.0/resources/doc/en/TOC.idx',
-        u'MathsMish-Test.py',
-        u'Question-Test.py']},
-        'split_percents': {0: 0.45190156599552572},
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0},
+                          loc('MathsMish/mmdb/BusinessLogic/SumManager.py'): {''\
+        'attrib-starts': [],
+        'first-line': 0,
+        'folded-linenos': [],
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0},
+                          loc('MathsMish/mmdb/BusinessLogic/__init__.py'): {''\
+        'attrib-starts': [],
+        'first-line': 0,
+        'folded-linenos': [],
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0}},
+        'has-focus': False},
+                               'open_files': [u'MathsMish/QuestionMachine.py',
+        u'MathsMish/MMDBExceptions.py',
+        u'MathsMish/__init__.py',
+        u'MathsMish/mmdb/BusinessLogic/QuestionManager.py',
+        u'MathsMish/mmdb/BusinessLogic/AttemptManager.py',
+        u'MathsMish/mmdb/BusinessLogic/SumManager.py',
+        u'MathsMish/mmdb/BusinessLogic/__init__.py',
+        u'MathsMish/diagnostic.py',
+        u'MathsMish/MathsMish.py']},
+        'split_percents': {0: 0.34772462077012833},
         'splits': 2,
         'tab_location': 'top',
         'user_data': {}},
                  'user_data': {}},
         'window-alloc': (0,
                          4,
-                         1897,
+                         1282,
                          957)}]}
-guimgr.recent-documents = [loc('Question-Test.py'),
-                           loc('MathsMish-Test.py'),
-                           loc('diagnostic.py'),
-                           loc('mmdb/DataAccess/SumDB.py'),
-                           loc('mmdb/DataAccess/AttemptDB.py'),
-                           loc('mmdb/BusinessObject/Attempt.py'),
-                           loc('QuestionMachine.py'),
-                           loc('mmdb/BusinessObject/Question.py'),
-                           loc('mmdb/BusinessObject/Sum.py'),
-                           loc('MathsMish.py'),
-                           loc('mmdb/BusinessLogic/AttemptManager.py'),
-                           loc('mmdb/BusinessLogic/SumManager.py')]
+guimgr.recent-documents = [loc('MathsMish/MathsMish.py'),
+                           loc('MathsMish/diagnostic.py'),
+                           loc('MathsMish/mmdb/BusinessLogic/__init__.py'),
+                           loc('MathsMish/mmdb/BusinessLogic/SumManager.py'),
+                           loc('MathsMish/mmdb/BusinessLogic/AttemptManager.py'),
+                           loc('MathsMish/mmdb/BusinessLogic/QuestionManager.py'),
+                           loc('MathsMish/__init__.py'),
+                           loc('MathsMish/MMDBExceptions.py'),
+                           loc('MathsMish/QuestionMachine.py')]
 guimgr.visual-state = {loc('../../../../../../bin/installed/Python2.6/Lib/logging/__init__.py'): {''\
         'attrib-starts': [('FileHandler',
                            771),
         'sel-line': 409,
         'sel-line-start': 11660,
         'selection_end': 11669,
-        'selection_start': 11669}}
+        'selection_start': 11669},
+                       loc('../MemoryMonitoring/mm.py'): {'attrib-starts': [],
+        'first-line': 64,
+        'folded-linenos': [],
+        'sel-line': 78,
+        'sel-line-start': 2700,
+        'selection_end': 2708,
+        'selection_start': 2708},
+                       loc('../programmingchallenge/12-medium.py'): {'attrib'\
+        '-starts': [('factors',
+                     0)],
+        'first-line': 0,
+        'folded-linenos': [],
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0},
+                       loc('../programmingchallenge/13-easy.py'): {'attrib-s'\
+        'tarts': [('isALeapYear',
+                   0)],
+        'first-line': 24,
+        'folded-linenos': [],
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0},
+                       loc('../programmingchallenge/13-medium.py'): {'attrib'\
+        '-starts': [],
+        'first-line': 0,
+        'folded-linenos': [],
+        'sel-line': 0,
+        'sel-line-start': 0,
+        'selection_end': 0,
+        'selection_start': 0},
+                       loc('../programmingchallenge/untitled-5.py'): {'attri'\
+        'b-starts': [('factor',
+                      0)],
+        'first-line': 0,
+        'folded-linenos': [],
+        'sel-line': 6,
+        'sel-line-start': 105,
+        'selection_end': 112,
+        'selection_start': 112}}
 proj.env-vars = {None: ('default',
                         ['']),
                  loc('../../../../../../bin/installed/Wing IDE 4.0/src/testing/runners/run_unittests_xml.py'): (''\
         ['']),
                  loc('MathsMish.py'): ('project',
                                        ['']),
+                 loc('MathsMish/diagnostic.py'): ('project',
+        ['']),
                  loc('diagnostic.py'): ('project',
         ['']),
                  loc('mmdb/DataAccess/AttemptDB.py'): ('project',
+        ['']),
+                 loc('../MemoryMonitoring/mm.py'): ('project',
+        ['']),
+                 loc('../programmingchallenge/12-medium.py'): ('project',
+        ['']),
+                 loc('../programmingchallenge/13-easy.py'): ('project',
+        ['']),
+                 loc('../programmingchallenge/13-medium.py'): ('project',
+        ['']),
+                 loc('../programmingchallenge/untitled-5.py'): ('project',
+        ['']),
+                 loc('unknown:untitled-1.py'): ('project',
+        ['']),
+                 loc('unknown:untitled-2.py'): ('project',
         [''])}

MathsMish/Diag999.txt

 SUM_LHS = ?
 1[6]<type 'list'>(11, 3, 6, 2)
 (12, 3, 6, 3)
+(42, 3, 6, 10)
+(59, 3, 6, 11)
+"""Pose Questions and Check Answers
+
+"""
+
+__author__ = "Richard Shea (rshea@thecubagroup.com)"
+__version__ = "$Revision: 0.1 $"
+__date__ = "$Date: 2010/05/06 21:03:00 $"
+__copyright__ = "Copyright (c) 2010 Richard Shea"
+
+from mmdb.BusinessObject.Question import Question 
+from mmdb.BusinessLogic.AttemptManager import AttemptManager
+#from Question import Question
+import MMDBExceptions
+
+class Operator:
+    ADD="+"
+    MULTIPLY="x"
+
+def PoseQuestionMultiply():
+	lstA = AttemptManager.GetAllForUser(-1)
+	q = Question("1",str(len(lstA)),"+")
+	#return str(q) 
+	return q
+    
+def PoseQuestion():
+
+	#q = Question("1","1","+")
+	#return str(q) 
+	return PoseQuestionMultiply()
+
+def MarkAnswer(q):
+	if q.suppliedAnswer == None:
+		raise MMDBExceptions.NoAnswerError
+	return q.goodAnswer()
+
+
+def main():
+	import pprint
+	import os
+	pp = pprint.PrettyPrinter(indent=4)
+	pp.pprint(os.sys.path)
+	ret = PoseQuestion()
+	#Now try to answer it
+	ret.suppliedAnswer = 12
+	if MarkAnswer(ret) == True:
+	    print "Good first attempt"
+	else:
+	    print "Bad first attempt"
+	
+	ret.suppliedAnswer = 1
+	
+	if MarkAnswer(ret) == True:
+	    print "Good second attempt"
+	else:
+	    print "Bad second attempt"
+	    
+	print "just for debug"
+
+if __name__ == '__main__':
+    main()

MathsMish/MMDBPrimary.log

 2012-02-19 14:35:58,283 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
 2012-02-19 14:35:58,283 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 4
 2012-02-19 14:35:58,283 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 4
+2012-02-22 23:27:40,608 - MMDB.primary - DEBUG - self.__QuestionPool = 24
+2012-02-22 23:27:40,635 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:40,635 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:40,635 - MMDB.primary - DEBUG - self.__lstNeverAsked = 24
+2012-02-22 23:27:40,635 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:40,635 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 4
+2012-02-22 23:27:40,727 - MMDB.primary - DEBUG - Question is : 3 x 2. Calculated Answer is 6. Adjusted Answer is 7
+2012-02-22 23:27:40,809 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:41,516 - MMDB.primary - DEBUG - self.__QuestionPool = 36
+2012-02-22 23:27:41,516 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:41,517 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:41,519 - MMDB.primary - DEBUG - self.__lstNeverAsked = 36
+2012-02-22 23:27:41,519 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:41,519 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 5
+2012-02-22 23:27:41,522 - MMDB.primary - DEBUG - Question is : 1 x 6. Calculated Answer is 6. Adjusted Answer is 6
+2012-02-22 23:27:41,523 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:42,066 - MMDB.primary - DEBUG - self.__QuestionPool = 42
+2012-02-22 23:27:42,068 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:42,069 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:42,069 - MMDB.primary - DEBUG - self.__lstNeverAsked = 42
+2012-02-22 23:27:42,071 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:42,072 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 6
+2012-02-22 23:27:42,073 - MMDB.primary - DEBUG - Question is : 2 x 3. Calculated Answer is 6. Adjusted Answer is 6
+2012-02-22 23:27:42,073 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:42,578 - MMDB.primary - DEBUG - self.__QuestionPool = 42
+2012-02-22 23:27:42,579 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:42,579 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:42,581 - MMDB.primary - DEBUG - self.__lstNeverAsked = 42
+2012-02-22 23:27:42,582 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:42,582 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 7
+2012-02-22 23:27:42,584 - MMDB.primary - DEBUG - Question is : 1 x 8. Calculated Answer is 8. Adjusted Answer is 9
+2012-02-22 23:27:42,585 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:43,256 - MMDB.primary - DEBUG - self.__QuestionPool = 48
+2012-02-22 23:27:43,257 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:43,259 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:43,259 - MMDB.primary - DEBUG - self.__lstNeverAsked = 48
+2012-02-22 23:27:43,260 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:43,262 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 8
+2012-02-22 23:27:43,263 - MMDB.primary - DEBUG - Question is : 3 x 4. Calculated Answer is 12. Adjusted Answer is 12
+2012-02-22 23:27:43,265 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:43,959 - MMDB.primary - DEBUG - self.__QuestionPool = 54
+2012-02-22 23:27:43,960 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:43,960 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:43,960 - MMDB.primary - DEBUG - self.__lstNeverAsked = 54
+2012-02-22 23:27:43,961 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:43,963 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 9
+2012-02-22 23:27:43,964 - MMDB.primary - DEBUG - Question is : 5 x 5. Calculated Answer is 25. Adjusted Answer is 25
+2012-02-22 23:27:43,966 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:44,592 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:44,592 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:44,594 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:44,595 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:44,595 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:44,596 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:44,598 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:44,599 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-22 23:27:44,601 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 2 
+2012-02-22 23:27:44,601 - MMDB.primary - DEBUG - Question is : 1 x 10. Calculated Answer is 10. Adjusted Answer is 11
+2012-02-22 23:27:44,602 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:45,171 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:45,171 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:45,171 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:45,173 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:45,174 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:45,174 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:45,174 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:45,176 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-22 23:27:45,176 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 2 
+2012-02-22 23:27:45,177 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 3 
+2012-02-22 23:27:45,177 - MMDB.primary - DEBUG - Question is : 3 x 11. Calculated Answer is 33. Adjusted Answer is 33
+2012-02-22 23:27:45,178 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:45,809 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:45,809 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:45,809 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:45,811 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:45,811 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:45,812 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:45,812 - MMDB.primary - DEBUG - Question is : 2 x 4. Calculated Answer is 8. Adjusted Answer is 8
+2012-02-22 23:27:45,813 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:46,473 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:46,474 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:46,476 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:46,476 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:46,477 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:46,487 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:46,490 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:46,490 - MMDB.primary - DEBUG - Question is : 2 x 11. Calculated Answer is 22. Adjusted Answer is 23
+2012-02-22 23:27:46,492 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:47,085 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:47,086 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:47,088 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:47,088 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:47,088 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:47,089 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:47,091 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:47,092 - MMDB.primary - DEBUG - Question is : 6 x 2. Calculated Answer is 12. Adjusted Answer is 12
+2012-02-22 23:27:47,112 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:47,763 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:47,763 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:47,763 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:47,765 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:47,766 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:47,766 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:47,766 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:47,769 - MMDB.primary - DEBUG - Question is : 4 x 3. Calculated Answer is 12. Adjusted Answer is 12
+2012-02-22 23:27:47,769 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:48,351 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:48,352 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:48,354 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:48,355 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:48,355 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:48,357 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:48,359 - MMDB.primary - DEBUG - Question is : 2 x 2. Calculated Answer is 4. Adjusted Answer is 5
+2012-02-22 23:27:48,361 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:48,994 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:48,996 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:48,996 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:48,996 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:48,997 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:48,999 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:49,000 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:49,000 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-22 23:27:49,000 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 2 
+2012-02-22 23:27:49,002 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 3 
+2012-02-22 23:27:49,002 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 4 
+2012-02-22 23:27:49,003 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 5 
+2012-02-22 23:27:49,005 - MMDB.primary - DEBUG - Question is : 2 x 7. Calculated Answer is 14. Adjusted Answer is 14
+2012-02-22 23:27:49,006 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:49,720 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:49,720 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:49,721 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:49,721 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:49,723 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:49,723 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:49,723 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:49,726 - MMDB.primary - DEBUG - Question is : 4 x 6. Calculated Answer is 24. Adjusted Answer is 24
+2012-02-22 23:27:49,726 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:50,273 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:50,275 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:50,275 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:50,276 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:50,276 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:50,276 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:50,278 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:50,279 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-22 23:27:50,279 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 2 
+2012-02-22 23:27:50,279 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 3 
+2012-02-22 23:27:50,280 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 4 
+2012-02-22 23:27:50,282 - MMDB.primary - DEBUG - Question is : 3 x 8. Calculated Answer is 24. Adjusted Answer is 25
+2012-02-22 23:27:50,282 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:50,967 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:50,969 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:50,970 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:50,970 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:50,970 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:50,970 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:50,973 - MMDB.primary - DEBUG - Question is : 5 x 2. Calculated Answer is 10. Adjusted Answer is 10
+2012-02-22 23:27:50,973 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:51,562 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:51,563 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:51,563 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:51,565 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:51,565 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:51,565 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:51,582 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:51,582 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-22 23:27:51,584 - MMDB.primary - DEBUG - Question is : 3 x 4. Calculated Answer is 12. Adjusted Answer is 12
+2012-02-22 23:27:51,585 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:52,102 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:52,104 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:52,105 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:52,105 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:52,107 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:52,108 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:52,108 - MMDB.primary - DEBUG - Question is : 6 x 3. Calculated Answer is 18. Adjusted Answer is 19
+2012-02-22 23:27:52,109 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:52,740 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:52,740 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:52,740 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:52,743 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:52,743 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:52,743 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-22 23:27:52,744 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-22 23:27:52,746 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-22 23:27:52,747 - MMDB.primary - DEBUG - Question is : 2 x 11. Calculated Answer is 22. Adjusted Answer is 22
+2012-02-22 23:27:52,749 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-22 23:27:53,390 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-22 23:27:53,391 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-22 23:27:53,391 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-22 23:27:53,391 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-22 23:27:53,392 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-22 23:27:53,394 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:11,305 - MMDB.primary - DEBUG - self.__QuestionPool = 24
+2012-02-23 00:08:11,305 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:11,305 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:11,305 - MMDB.primary - DEBUG - self.__lstNeverAsked = 24
+2012-02-23 00:08:11,306 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:11,306 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 4
+2012-02-23 00:08:11,332 - MMDB.primary - DEBUG - Question is : 1 x 5. Calculated Answer is 5. Adjusted Answer is 6
+2012-02-23 00:08:11,335 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:11,845 - MMDB.primary - DEBUG - self.__QuestionPool = 42
+2012-02-23 00:08:11,846 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:11,848 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:11,848 - MMDB.primary - DEBUG - self.__lstNeverAsked = 42
+2012-02-23 00:08:11,849 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:11,851 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 6
+2012-02-23 00:08:11,851 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:11,852 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-23 00:08:11,855 - MMDB.primary - DEBUG - Question is : 6 x 10. Calculated Answer is 60. Adjusted Answer is 60
+2012-02-23 00:08:11,855 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:12,328 - MMDB.primary - DEBUG - self.__QuestionPool = 48
+2012-02-23 00:08:12,329 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:12,331 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:12,332 - MMDB.primary - DEBUG - self.__lstNeverAsked = 48
+2012-02-23 00:08:12,332 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:12,334 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 8
+2012-02-23 00:08:12,335 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:12,335 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-23 00:08:12,338 - MMDB.primary - DEBUG - Question is : 5 x 7. Calculated Answer is 35. Adjusted Answer is 35
+2012-02-23 00:08:12,338 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:12,924 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:12,926 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:12,927 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:12,927 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:12,928 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:12,930 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:12,931 - MMDB.primary - DEBUG - Question is : 5 x 4. Calculated Answer is 20. Adjusted Answer is 21
+2012-02-23 00:08:12,933 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:13,381 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:13,382 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:13,384 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:13,387 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:13,388 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:13,388 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:13,390 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:13,391 - MMDB.primary - DEBUG - Question is : 5 x 5. Calculated Answer is 25. Adjusted Answer is 25
+2012-02-23 00:08:13,392 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:13,862 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:13,864 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:13,865 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:13,865 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:13,868 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:13,868 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:13,869 - MMDB.primary - DEBUG - Question is : 1 x 10. Calculated Answer is 10. Adjusted Answer is 10
+2012-02-23 00:08:13,871 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:14,381 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:14,381 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:14,382 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:14,384 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:14,384 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:14,385 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:14,388 - MMDB.primary - DEBUG - Question is : 5 x 10. Calculated Answer is 50. Adjusted Answer is 51
+2012-02-23 00:08:14,388 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:14,917 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:14,917 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:14,918 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:14,920 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:14,921 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:14,921 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:14,924 - MMDB.primary - DEBUG - Question is : 1 x 8. Calculated Answer is 8. Adjusted Answer is 8
+2012-02-23 00:08:14,924 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:15,489 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:15,490 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:15,490 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:15,492 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:15,493 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:15,493 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:15,496 - MMDB.primary - DEBUG - Question is : 3 x 6. Calculated Answer is 18. Adjusted Answer is 18
+2012-02-23 00:08:15,497 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:16,397 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:16,398 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:16,398 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:16,400 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:16,401 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:16,401 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:16,401 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:16,404 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-23 00:08:16,405 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 2 
+2012-02-23 00:08:16,407 - MMDB.primary - DEBUG - Question is : 3 x 12. Calculated Answer is 36. Adjusted Answer is 37
+2012-02-23 00:08:16,407 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:16,936 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:16,937 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:16,937 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:16,938 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:16,940 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:16,940 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:16,943 - MMDB.primary - DEBUG - Question is : 2 x 7. Calculated Answer is 14. Adjusted Answer is 14
+2012-02-23 00:08:16,944 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:17,401 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:17,403 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:17,404 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:17,404 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:17,405 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:17,407 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:17,407 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:17,408 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-23 00:08:17,410 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 2 
+2012-02-23 00:08:17,411 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 3 
+2012-02-23 00:08:17,413 - MMDB.primary - DEBUG - Question is : 6 x 11. Calculated Answer is 66. Adjusted Answer is 66
+2012-02-23 00:08:17,414 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:17,905 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:17,907 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:17,907 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:17,908 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:17,910 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:17,911 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:17,913 - MMDB.primary - DEBUG - Question is : 5 x 5. Calculated Answer is 25. Adjusted Answer is 26
+2012-02-23 00:08:17,914 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:18,407 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:18,410 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:18,474 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:18,476 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:18,476 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:18,477 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:18,479 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:18,480 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-23 00:08:18,480 - MMDB.primary - DEBUG - Question is : 2 x 3. Calculated Answer is 6. Adjusted Answer is 6
+2012-02-23 00:08:18,482 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:19,013 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:19,015 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:19,016 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:19,016 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:19,016 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:19,017 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:19,019 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:19,020 - MMDB.primary - DEBUG - Question is : 5 x 10. Calculated Answer is 50. Adjusted Answer is 50
+2012-02-23 00:08:19,022 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:19,596 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:19,598 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:19,599 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:19,601 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:19,601 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:19,601 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:19,602 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:19,605 - MMDB.primary - DEBUG - Question is : 2 x 7. Calculated Answer is 14. Adjusted Answer is 15
+2012-02-23 00:08:19,605 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:20,447 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:20,448 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:20,450 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:20,450 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:20,451 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:20,453 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:20,453 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:20,454 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 1 
+2012-02-23 00:08:20,457 - MMDB.primary - DEBUG - Question is : 4 x 3. Calculated Answer is 12. Adjusted Answer is 12
+2012-02-23 00:08:20,457 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:20,956 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:20,957 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:20,959 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:20,960 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:20,960 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:20,961 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:20,963 - MMDB.primary - DEBUG - AbsorbingIndex Error when attemptCnt was 0 
+2012-02-23 00:08:20,964 - MMDB.primary - DEBUG - Question is : 1 x 4. Calculated Answer is 4. Adjusted Answer is 4
+2012-02-23 00:08:20,967 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:21,568 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:21,569 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:21,569 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:21,571 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:21,572 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:21,575 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:21,575 - MMDB.primary - DEBUG - Question is : 3 x 12. Calculated Answer is 36. Adjusted Answer is 37
+2012-02-23 00:08:21,576 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:22,400 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:22,401 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:22,401 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:22,403 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:22,404 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:22,407 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10
+2012-02-23 00:08:22,408 - MMDB.primary - DEBUG - Question is : 4 x 11. Calculated Answer is 44. Adjusted Answer is 44
+2012-02-23 00:08:22,410 - MMDB.primary - DEBUG - dir(qq) = 
+2012-02-23 00:08:22,930 - MMDB.primary - DEBUG - self.__QuestionPool = 60
+2012-02-23 00:08:22,931 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlyFailed = 0
+2012-02-23 00:08:22,933 - MMDB.primary - DEBUG - self.__lstAskedMostRecentlySucceeded = 0
+2012-02-23 00:08:22,934 - MMDB.primary - DEBUG - self.__lstNeverAsked = 60
+2012-02-23 00:08:22,934 - MMDB.primary - DEBUG - self.__lhsDefaultsInUse = 6
+2012-02-23 00:08:22,936 - MMDB.primary - DEBUG - self.__rhsDefaultsInUse = 10

MathsMish/MathsMish-Test.py

-import unittest
-import MathsMish
-import minimock
-from mmdb.flock import flock            
-import MMDBExceptions
-from MMDBConstants import MMDBConstants
-#from Question import Question
-from QuestionMachine import QuestionMachine
-from mmdb.BusinessObject.Question import Question 
-# Here's our "unit tests".
-class PoseQuestionTestCase(unittest.TestCase):
-
-	def setUp(self):
-		#self.lock = flock('tmp.lock', True).acquire()		
-		#if self.lock == False:
-		#	raise ValueError
-
-		self.question = MathsMish.PoseQuestion()
-		self.lstQuestionElements = str(self.question).split()
-
-		# Track all calls into our mock objects. If we don't use a TraceTracker
-		# then all output will go to stdout, but we want to capture it.
-		self.tracker = minimock.TraceTracker()
-
-	def tearDown(self):
-		#self.lock.release()
-		# Restore all objects in global module state that minimock had
-		# replaced.
-		minimock.restore()
-
-class PoseQuestionTests(PoseQuestionTestCase):
-
-	def testQuestionProvided(self):
-		'''Test that some sort of question is posed'''
-		self.failUnless(isinstance(MathsMish.PoseQuestion(), Question))
-
-	def testQuestionThreeComponents(self):
-		'''Test the provided answer has three components'''
-		self.failIf(len(self.lstQuestionElements) != 3)
-
-	def testQuestionCorrectOperator(self):
-		'''Test the provided answer has a valid operator as it's central component'''
-		self.failUnless(self.lstQuestionElements[1] in MMDBConstants.VALID_OPERATORS)
-        
-	def testQuestionLHSIsInteger(self):
-		'''Test the provided answer has an integer as it's LH operand'''
-		operand = None
-		try:
-			operand = int(self.lstQuestionElements[0])
-		except ValueError:
-			operand = None
-
-		self.failIf(operand == None)
-
-	def testQuestionRHSIsInteger(self):
-		'''Test the provided answer has an integer as it's RH operand'''
-		operand = None
-		try:
-			operand = int(self.lstQuestionElements[2])
-		except ValueError:
-			operand = None
-
-		self.failIf(operand == None)
-
-	def testQuestionWithMocks(self):
-		'''This test doesn't do anything useful it's just here to illustrate the use of mocks'''
-
-		# foo.bar invokes urllib2.urlopen, and then calls read() on the
-		# resultin file object, so we'll use minimock to create a mocked
-		# urllib2.
-
-		#lstAttempts = minimock.Mock('AttemptManager', tracker=self.tracker)
-		#AttemptManager.GetAllForUser = minimock.Mock('AttemptManager.GetAllForUser', tracker=self.tracker, returns=[])
-		print MathsMish.PoseQuestion()
-		from mmdb.BusinessLogic.AttemptManager import AttemptManager
-		AttemptManager.GetAllForUser = minimock.Mock('AttemptManager.GetAllForUser')
-		AttemptManager.GetAllForUser.mock_returns = "" 
-		self.assertEquals(len(str(MathsMish.PoseQuestion())),5)
-
-class MarkAnswerTests(unittest.TestCase):
-
-	def testMarkProvided(self):
-		'''Test that a boolean response is provided to a request to mark a question'''
-		q = Question(1, 1, MathsMish.Operator.ADD)
-		q.suppliedAnswer = 0 
-		a = MathsMish.MarkAnswer(q)
-		self.failUnless(isinstance(a, bool))
-
-	def testExceptionWhenNoAnswerSupplied(self):
-		'''Test an exception is raised when no answer is provided'''
-		q = Question(1, 1, MathsMish.Operator.ADD)
-		self.assertRaises(MMDBExceptions.NoAnswerError, MathsMish.MarkAnswer, q)
-	
-	def testMarkedFalseForFalseAdditionAnswer(self):
-		'''Test False is returned when addition answer is wrong'''
-		q = Question(1, 1, MathsMish.Operator.ADD)
-		q.suppliedAnswer = 0 
-		self.failUnless(MathsMish.MarkAnswer(q) == False)
-
-	def testMarkedTrueForTrueAdditionAnswer(self):
-		'''Test True is returned when addition answer is correct'''
-		q = Question(1, 1, MathsMish.Operator.ADD)
-		q.suppliedAnswer = 2 
-		self.failUnless(MathsMish.MarkAnswer(q) == True)
-
-	def testMarkedFalseForFalseAdditionAnswer(self):
-		'''Test False is returned when multiplication is wrong'''
-		q = Question(1, 1, MathsMish.Operator.MULTIPLY)
-		q.suppliedAnswer = 0 
-		self.failUnless(MathsMish.MarkAnswer(q) == False)
-
-	def testMarkedTrueForTrueAdditionAnswer(self):
-		'''Test True is returned when multiplication is correct'''
-		q = Question(2, 4, MathsMish.Operator.MULTIPLY)
-		q.suppliedAnswer = 8 
-		self.failUnless(MathsMish.MarkAnswer(q) == True)
-
-
-
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
-

MathsMish/MathsMish.py

-"""Pose Questions and Check Answers
-
-"""
-
-__author__ = "Richard Shea (rshea@thecubagroup.com)"
-__version__ = "$Revision: 0.1 $"
-__date__ = "$Date: 2010/05/06 21:03:00 $"
-__copyright__ = "Copyright (c) 2010 Richard Shea"
-
-from mmdb.BusinessLogic.AttemptManager import AttemptManager
-from mmdb.BusinessObject.Question import Question 
-#from Question import Question
-import MMDBExceptions
-
-class Operator:
-    ADD="+"
-    MULTIPLY="x"
-
-def PoseQuestionMultiply():
-	lstA = AttemptManager.GetAllForUser(-1)
-	q = Question("1",str(len(lstA)),"+")
-	#return str(q) 
-	return q
-    
-def PoseQuestion():
-
-	#q = Question("1","1","+")
-	#return str(q) 
-	return PoseQuestionMultiply()
-
-def MarkAnswer(q):
-	if q.suppliedAnswer == None:
-		raise MMDBExceptions.NoAnswerError
-	return q.goodAnswer()
-
-
-def main():
-	import pprint
-	import os
-	pp = pprint.PrettyPrinter(indent=4)
-	pp.pprint(os.sys.path)
-	ret = PoseQuestion()
-	#Now try to answer it
-	ret.suppliedAnswer = 12
-	if MarkAnswer(ret) == True:
-	    print "Good first attempt"
-	else:
-	    print "Bad first attempt"
-	
-	ret.suppliedAnswer = 1
-	
-	if MarkAnswer(ret) == True:
-	    print "Good second attempt"
-	else:
-	    print "Bad second attempt"
-	    
-	print "just for debug"
-
-if __name__ == '__main__':
-    main()

MathsMish/MathsMish.pyc

Binary file removed.

MathsMish/Question-Test.py

-import unittest
-import MathsMish
-import minimock
-from mmdb.flock import flock            
-import MMDBExceptions
-from MMDBConstants import MMDBConstants
-from mmdb.BusinessObject.Question import Question 
-from QuestionMachine import QuestionMachine
-class QuestionTestCase(unittest.TestCase):
-
-	def setUp(self):
-		# Track all calls into our mock objects. If we don't use a TraceTracker
-		# then all output will go to stdout, but we want to capture it.
-		self.tracker = minimock.TraceTracker()
-
-	def tearDown(self):
-		# Restore all objects in global module state that minimock had
-		# replaced.
-		minimock.restore()
-
-class QuestionTests(QuestionTestCase):
-
-	def testQuestionInitialisation(self):
-		'''Test the initialisation of the Question class'''
-		print "testQuestionInitialisation has been temporarily disabled"
-		self.failUnlessRaises(MMDBExceptions.NotInteger, Question, None, None, None)
-	def testQuestionLHSInitialisation(self):
-		'''Test the initialisation of the Question class LHS parameter'''
-		print "testQuestionLHSInitialisation has been temporarily disabled"
-		#self.failUnlessRaises(MMDBExceptions.NotInteger, Question, None, 1, MathsMish.Operator.ADD)
-	def testQuestionRHSInitialisation(self):
-		'''Test the initialisation of the Question class RHS parameter'''
-		print "testQuestionRHSInitialisation has been temporarily disabled"
-		#self.failUnlessRaises(MMDBExceptions.NotInteger, Question, 1, None, MathsMish.Operator.ADD)
-	def testQuestionOperatorInitialisation(self):
-		'''Test the initialisation of the Question class Operator parameter'''
-		print "testQuestionOperatorInitialisation has been temporarily disabled"
-		#self.failUnlessRaises(MMDBExceptions.NotValidOperator, Question, 1, 1, '')
-		
-

MathsMish/Question.py

-import MMDBExceptions
+import MathsMish.MMDBExceptions
 from MMDBConstants import MMDBConstants
 
 class Question(object):

MathsMish/QuestionMachine-Test.py

-import datetime, time
-from datetime import timedelta
-import random		
-import unittest
-import MathsMish
-import minimock
-from mmdb.mmdbConnection import mmdbConnection
-from mmdb.flock import flock            
-import MMDBExceptions
-from MMDBConstants import MMDBConstants
-from mmdb.BusinessObject.Question import Question 
-from QuestionMachine import QuestionMachine
-
-class QuestionMachineTestCase(unittest.TestCase):
-
-	def setUp(self):
-		self.lock = flock('tmp.lock', False).acquire()		
-		if self.lock == False:
-			raise ValueError
-
-		self.mmdbConnLocal = mmdbConnection()
-		self.testDBConn = self.mmdbConnLocal.conn
-
-		self.basicgoodqm = QuestionMachine(1,'x')
-		# Track all calls into our mock objects. If we don't use a TraceTracker
-		# then all output will go to stdout, but we want to capture it.
-		self.tracker = minimock.TraceTracker()
-
-	def tearDown(self):
-		#self.lock.release()
-		# Restore all objects in global module state that minimock had
-		# replaced.
-		minimock.restore()
-
-class QuestionMachineTests(QuestionMachineTestCase):
-
-	def __allCandidateQuestionsAreQuestions(self):
-		blnAllQuestions = True
-		for q in self.basicgoodqm.CandidateQuestions:
-			if isinstance(q,Question):
-				pass
-			else:
-				blnAllQuestions = False
-				break
-		return blnAllQuestions
-
-	def __insertTestData(self):
-		curs = self.testDBConn.cursor()
-		#=================================================
-		f = open('ATTDumpFromInsertAttempts111.txt', 'w')
-		curs.execute('''SELECT * FROM MAM_SUMS''')
-		lstSQL = curs.fetchall()
-		for r in lstSQL:
-			f.write(str(r))
-			f.write('\n')
-		f.write("1+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		f.write("2+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		curs = self.testDBConn.cursor()
-		curs.execute('''SELECT * FROM MAM_ATTEMPT''')
-		f.write("3+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		lstSQL = curs.fetchall()
-		f.write("4+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		for r in lstSQL:
-			f.write(str(r))
-			f.write('\n')
-		f.write("5+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		f.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		f.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		#=================================================
-		print "start __insertTestData"
-		iCount = 0
-		for lhs in MMDBConstants.LHS_CANDIDATES[MMDBConstants.LHS_STARTOFFSET:MMDBConstants.LHS_STARTOFFSET + 2]:
-			print "__insertTestData [a]"
-			for rhs in MMDBConstants.RHS_CANDIDATES[MMDBConstants.RHS_STARTOFFSET:MMDBConstants.RHS_STARTOFFSET + 2]: 
-				print "start __insertTestData [b] : lhs = %s, rhs = %s" % (lhs, rhs)
-				#Insert the SUM
-				curs.execute('''insert into MAM_SUMS values (NULL, '*', %s, %s)''' % (lhs,rhs))
-				#Find the autoid that's just been created
-				curs.execute('''select max(SUM_AUTOID) from MAM_SUMS''')
-				#Insert a few attempts on that sum
-				rowSUM = curs.fetchone()
-				#Set up some fake times
-				now = datetime.datetime.now()
-				now = now - timedelta(minutes=12)
-				for minoffset in [1,1,2,1]:
-					secoffset = random.randrange(0, 59)
-					millisecondsoffset = random.randrange(0,999)
-					microsecondsoffset = random.randrange(0,999)
-					now = now + timedelta(minutes=minoffset, seconds=secoffset, milliseconds=millisecondsoffset, microseconds=microsecondsoffset)
-					if iCount % 3 == 0:
-						blnCorrect = 0
-					else:
-						blnCorrect = 1
-					iCount += 1
-					curs.execute('''insert into MAM_ATTEMPT values (NULL, 1 , ?, ?, 1, ?)''',(rowSUM[0], now, blnCorrect))
-					
-		print "end __insertTestData"
-		self.testDBConn.commit()		
-		#=================================================
-		curs = self.testDBConn.cursor()
-		curs.execute('''SELECT * FROM MAM_SUMS''')
-		lstSQL = curs.fetchall()
-		for r in lstSQL:
-			f.write(str(r))
-			f.write('\n')
-		f.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		curs = self.testDBConn.cursor()
-		curs.execute('''SELECT * FROM MAM_ATTEMPT''')
-		lstSQL = curs.fetchall()
-		for r in lstSQL:
-			f.write(str(r))
-			f.write('\n')
-		f.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		f.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		f.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
-		f.write('\n')
-		f.close()
-		#=================================================
-		
-	def testBadInitisation1(self):
-		'''Test that a QuestionMachine class is not created when using bad userid arg'''
-		self.failUnlessRaises(MMDBExceptions.NotInteger, QuestionMachine, None,'x')
-
-	def testBadInitisation2(self):
-		'''Test that a QuestionMachine class is not created when using bad operator arg'''
-		self.failUnlessRaises(MMDBExceptions.NotValidOperator, QuestionMachine, 1, '')
-
-	def testInitisation3(self):
-		'''Test that a QuestionMachine class is created using default data'''
-		self.failUnless(isinstance(self.basicgoodqm , QuestionMachine))
-
-	def testCandidateSpaceCreation1(self):
-		'''Test that CandidateSpace is created as a list'''
-		print "Here we are in testCandidateSpaceCreation1"
-		print type(self.basicgoodqm.CandidateQuestions)
-		self.failUnless(isinstance(self.basicgoodqm.CandidateQuestions, list))
-
-	def testCandidateSpaceCreation2(self):
-		'''Test that CandidateSpace is a list of questions'''
-		self.failIf(self.__allCandidateQuestionsAreQuestions == False)
-
-	def testCandidateSpaceCreation3(self):
-		'''Test that CandidateSpace has the right number of questions in it'''
-		self.failUnless(len(self.basicgoodqm.CandidateQuestions) == 0)
-
-

MathsMish/QuestionMachine.py

 from MMDBConstants import MMDBConstants
 import MMDBExceptions
 from mmdb.BusinessObject.Question import Question 
+from mmdb.BusinessObject.Attempt import Attempt
 from mmdb.BusinessLogic.AttemptManager import AttemptManager
 from mmdb.BusinessLogic.SumManager import SumManager
 from mmdb.BusinessLogic.QuestionManager import QuestionManager
-from mmdb.BusinessObject.Attempt import Attempt
 from mmdb.mmdbConnection import SQLLITETRUE 
 from mmdb.mmdbConnection import SQLLITEFALSE
 import random

MathsMish/QuestionMachine.pyc

Binary file modified.

MathsMish/__init__.pyc

Binary file modified.

MathsMish/diagnostic.py

+import pprint
 from QuestionMachine import QuestionMachine
 import MMDBLogger
 import logging

MathsMish/mmdb/BusinessLogic/AttemptManager-Test.py

-import os
-os.sys.path.append("C:\\usr\\rshea\\data\\src\\Python\\MathsMish")
-import unittest
-import minimock
-import mocker
-from mmdb.DataAccess.AttemptDB import AttemptDB
-from mmdb.BusinessLogic.AttemptManager import AttemptManager
-from mmdb.BusinessObject.Attempt import Attempt
-from mmdb.mmdbConnection import mmdbConnection
-from mmdb.flock import flock            
-
-class AttemptManagerCase(unittest.TestCase):
-	def setUp(self):
-		# Track all calls into our mock objects. If we don't use a TraceTracker
-		# then all output will go to stdout, but we want to capture it.
-		self.tracker = minimock.TraceTracker()
-
-	def tearDown(self):
-		# Restore all objects in global module state that minimock had
-		# replaced.
-		minimock.restore()
-	
-class AttemptManagerTests(AttemptManagerCase):
-
-	#SAMPLEUSER is only to be used until we've worked out how to mock the db properly
-	SAMPLEUSER = 1
-	def testForAllFailuresForUserInRange(self):
-		'''Test that we receive no rows when we ask for a non-existent user'''
-		print "About to call AttemptDB.GetAllForUser"
-		lstAttempts = AttemptDB.GetAllFailuresForUser(-1)
-		print "Finished call AttemptDB.GetAllForUser"
-		self.failUnless(len(lstAttempts)==0)
-
-	def testGetAll(self):
-		self.failUnless(len(AttemptDB.GetAll()) > 0)
-	
-	def testGetAllForUser(self):
-		self.failUnless(len(AttemptManager.GetAllForUser(self.SAMPLEUSER)) == 1)
-
-	'''
-	def testGetCountOfLHSSuccesses(self):
-		lst = range(1,12)
-		#=================================================
-		f = open('Diag2.txt', 'w+')
-		for debugValue in lst:
-			f.write(str(debugValue))
-			f.write('\n')
-		f.close()		
-		#=================================================
-		self.failUnless(len(AttemptManager.GetCountOfLHSSuccesses(self.SAMPLEUSER, lst)) > 0)
-
-	def testGetCountOfRHSSuccesses(self):
-		lst = range(1,12)
-		self.failUnless(len(AttemptManager.GetCountOfRHSSuccesses(self.SAMPLEUSER, lst)) > 0) 
-	'''
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
-

MathsMish/mmdb/BusinessLogic/AttemptManager.pyc

Binary file modified.

MathsMish/mmdb/BusinessLogic/QuestionManager.pyc

Binary file modified.

MathsMish/mmdb/BusinessLogic/SumManager.pyc

Binary file modified.

MathsMish/mmdb/BusinessObject/Attempt.pyc

Binary file modified.

MathsMish/mmdb/BusinessObject/Question.pyc

Binary file modified.

MathsMish/mmdb/DataAccess/AttemptDB-Test.py

-import os
-os.sys.path.append("C:\\usr\\rshea\\data\\src\\Python\\MathsMish")
-import unittest
-import minimock
-import mocker
-from mmdb.DataAccess.AttemptDB import AttemptDB
-from mmdb.BusinessObject.Attempt import Attempt
-from mmdb.mmdbConnection import mmdbConnection
-from mmdb.flock import flock            
-
-TESTDBPATH = 'C://usr//rshea//data//src//Python//SQLite//TestMMM.db'
-class AttemptDBTestCase(unittest.TestCase):
-	def setUp(self):
-
-		# Track all calls into our mock objects. If we don't use a TraceTracker
-		# then all output will go to stdout, but we want to capture it.
-		self.tracker = minimock.TraceTracker()
-
-	def tearDown(self):
-		# Restore all objects in global module state that minimock had
-		# replaced.
-		minimock.restore()
-	
-
-
-
-class AttemptDBTests(AttemptDBTestCase):
-
-	#SAMPLEUSER is only to be used until we've worked out how to mock the db properly
-	SAMPLEUSER = 1
-	def testForNoRowsFound(self):
-		'''Test that we receive no rows when we ask for a non-existent user'''
-		print "About to call AttemptDB.GetAllForUser"
-		lstAttempts = AttemptDB.GetAllForUser(-1)
-		print "Finished call AttemptDB.GetAllForUser"
-		self.failUnless(len(lstAttempts)==0)
-
-#	def testForAllObjectsBeingAttempts(self):
-#		'''Test that we receive no rows when we ask for a non-existent user'''
-#		blnFoundSomethingOtherThanAnAttempt = False
-#		lstAttempts = AttemptDB.GetAllForUser(self.SAMPLEUSER)
-#		for a in lstAttempts:
-#			if (isinstance(a, Attempt)):
-#				pass
-#			else:
-#				blnFoundSomethingOtherThanAnAttempt = True 
-#
-#		self.failIf(blnFoundSomethingOtherThanAnAttempt == True)
-
-	def testGetAll(self):
-		self.failUnless(len(AttemptDB.GetAll()) > 0)
-	
-	def testGetAllForUser(self):
-		self.failUnless(len(AttemptDB.GetAllForUser(self.SAMPLEUSER)) == 1)
-
-	def testGetAllForUser(self):
-		print "About to dump type used in isInstanceAssertion : %s" % str(type(AttemptDB.GetCountsSuccessesForUserAndRHSOperands(self.SAMPLEUSER,[11,12])))
-		print "About to dump value used in isInstanceAssertion : %s" % str(AttemptDB.GetCountsSuccessesForUserAndRHSOperands(self.SAMPLEUSER,[11,12]))
-		self.failUnless(isinstance(AttemptDB.GetCountsSuccessesForUserAndRHSOperands(self.SAMPLEUSER,[11,12]),list))
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
-

MathsMish/mmdb/DataAccess/AttemptDB.pyc

Binary file modified.

MathsMish/mmdb/DataAccess/QuestionDB.pyc

Binary file modified.

MathsMish/mmdb/DataAccess/SumDB.pyc

Binary file modified.

MathsMish/mmdb/mmdbConnection-Test.py

-import os
-os.sys.path.append("C:\\usr\\rshea\\data\\src\\Python\\MathsMish")
-import unittest
-import sqlite3
-import minimock
-
-from mmdb.mmdbConnection import mmdbConnection
-
-class mmdbConnectionTestCase(unittest.TestCase):
-	def setUp(self):
-		# Setup a database connection
-		self.objmmdbc = mmdbConnection()
-		self.myconn = self.objmmdbc.conn
-		
-		# Track all calls into our mock objects. If we don't use a TraceTracker
-		# then all output will go to stdout, but we want to capture it.
-		self.tracker = minimock.TraceTracker()
-
-
-	def tearDown(self):
-		# Close the database connection
-		self.myconn.close()
-
-		# Restore all objects in global module state that minimock had
-		# replaced.
-		minimock.restore()
-
-class mmdbConnectionTests(mmdbConnectionTestCase):
-
-	def testForConnectionMade(self):
-		'''Test that a connection object is returned'''
-		self.failUnless(self.myconn, sqlite3.Connection)
-
-	def testNoConnectionMade(self):
-		'''Test that no connection object is returned when we don't instantiate the object'''
-		myDudconn = None 
-		self.failIf(myDudconn, sqlite3.Connection)
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
-
+print "Here we are in root"
 
 import paver.doctools
 
-'''
 setup(
-    name="pySourceAid",
-    packages=['pySourceAid'],
+    name="MathsMish",
+    packages=['MathsMish'],
     version="0.1",
     url="http://mainlydata.kubadev.com/",
     author="Richard Shea",
     sphinxAutodocInit=Bunch(
         suffix="rst",
         destdir=".\docs\source\modules",
-        modulepath=".\pySourceAid",
+        modulepath=".\MathsMish",
         sourceFileBuildScript="generate_modules.py"
     ),
     minilib=Bunch(
     ), 
     
 ) 
-'''
 
 @task
 def nosetests():
     else:
         raise BuildFailure
 
-'''
 @task
 @needs('paver.doctools.html')
 def html(options):
     """Generate docs and source distribution."""
     pass
 
-'''
     
 
 

test/AttemptDB-Test.py

+import os
+os.sys.path.append("C:\\usr\\rshea\\data\\src\\Python\\MathsMish\\MathsMish")
+import unittest
+import minimock
+import mocker
+from mmdb.DataAccess.AttemptDB import AttemptDB
+from mmdb.BusinessObject.Attempt import Attempt
+from mmdb.mmdbConnection import mmdbConnection
+from mmdb.flock import flock            
+
+TESTDBPATH = 'C://usr//rshea//data//src//Python//SQLite//TestMMM.db'
+class AttemptDBTestCase(unittest.TestCase):
+	def setUp(self):
+
+		# Track all calls into our mock objects. If we don't use a TraceTracker
+		# then all output will go to stdout, but we want to capture it.
+		self.tracker = minimock.TraceTracker()
+
+	def tearDown(self):
+		# Restore all objects in global module state that minimock had
+		# replaced.
+		minimock.restore()
+	
+
+
+
+class AttemptDBTests(AttemptDBTestCase):
+
+	#SAMPLEUSER is only to be used until we've worked out how to mock the db properly
+	SAMPLEUSER = 1
+	def testForNoRowsFound(self):
+		'''Test that we receive no rows when we ask for a non-existent user'''
+		print "About to call AttemptDB.GetAllForUser"
+		lstAttempts = AttemptDB.GetAllForUser(-1)
+		print "Finished call AttemptDB.GetAllForUser"
+		self.failUnless(len(lstAttempts)==0)
+
+#	def testForAllObjectsBeingAttempts(self):
+#		'''Test that we receive no rows when we ask for a non-existent user'''
+#		blnFoundSomethingOtherThanAnAttempt = False
+#		lstAttempts = AttemptDB.GetAllForUser(self.SAMPLEUSER)
+#		for a in lstAttempts:
+#			if (isinstance(a, Attempt)):
+#				pass
+#			else:
+#				blnFoundSomethingOtherThanAnAttempt = True 
+#
+#		self.failIf(blnFoundSomethingOtherThanAnAttempt == True)
+
+	def testGetAll(self):
+		self.failUnless(len(AttemptDB.GetAll()) > 0)
+	
+	def testGetAllForUser(self):
+		self.failUnless(len(AttemptDB.GetAllForUser(self.SAMPLEUSER)) == 1)
+
+	def testGetAllForUser(self):
+		print "About to dump type used in isInstanceAssertion : %s" % str(type(AttemptDB.GetCountsSuccessesForUserAndRHSOperands(self.SAMPLEUSER,[11,12])))
+		print "About to dump value used in isInstanceAssertion : %s" % str(AttemptDB.GetCountsSuccessesForUserAndRHSOperands(self.SAMPLEUSER,[11,12]))
+		self.failUnless(isinstance(AttemptDB.GetCountsSuccessesForUserAndRHSOperands(self.SAMPLEUSER,[11,12]),list))
+
+def main():
+    unittest.main()
+
+if __name__ == '__main__':
+    main()
+

test/AttemptDB-Test.pyc

Binary file added.

test/AttemptManager-Test.py

+import os
+#os.sys.path.append("C:\\usr\\rshea\\data\\src\\Python\\MathsMish\\MathsMish")
+import unittest
+import minimock
+import mocker
+from mmdb.DataAccess.AttemptDB import AttemptDB
+from mmdb.BusinessLogic.AttemptManager import AttemptManager
+from mmdb.BusinessObject.Attempt import Attempt
+from mmdb.mmdbConnection import mmdbConnection
+from mmdb.flock import flock