source: tmcsimulator/trunk/src/python/unifiedlogger/wing_project.wpr @ 478

Revision 478, 25.9 KB checked in by jdalbey, 7 years ago (diff)

Fix typo in actitivylog watcher and add simple unit test of logging service methods

Line 
1#!wing
2#!version=7.0
3##################################################################
4# Wing project file                                              #
5##################################################################
6[project attributes]
7debug.launch-configs = (2,
8                        {'launch-79fWcT8eQm1A3xyz': ({},
9        {'buildcmd': ('project',
10                      None),
11         'env': ('project',
12                 [u'']),
13         'name': 'unit test',
14         'pyexec': ('custom',
15                    u'/usr/bin/pytest'),
16         'pypath': ('project',
17                    []),
18         'pyrunargs': ('project',
19                       '-u'),
20         'runargs': u'',
21         'rundir': ('custom',
22                    u'/home/jdalbey/Dropbox/TMCrepo/trunk/src/python/unifiedlogger')}),
23                         'launch-Dap54cn2qAN7AXZm': ({},
24        {'buildcmd': ('project',
25                      None),
26         'env': ('project',
27                 [u'']),
28         'name': 'launchme',
29         'pyexec': ('project',
30                    u''),
31         'pypath': ('project',
32                    []),
33         'pyrunargs': ('project',
34                       '-u'),
35         'runargs': u'',
36         'rundir': ('custom',
37                    u'/home/jdalbey/Dropbox/TMCrepo/trunk')})})
38proj.directory-list = [{'dirloc': loc('.'),
39                        'excludes': (),
40                        'filter': u'*',
41                        'include_hidden': False,
42                        'recursive': True,
43                        'watch_for_changes': True}]
44proj.file-type = 'normal'
45proj.home-dir = loc('../..')
46proj.launch-config = {loc('__main__.py'): ('custom',
47        (u'',
48         'launch-Dap54cn2qAN7AXZm'))}
49[user attributes]
50debug.show-args-dialog = {loc('__main__.py'): False}
51edit.file-encoding = {loc('get_revision'): 'UTF-8',
52                      loc('test_logging_service.py'): 'UTF-8'}
53guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
54                            'windows': [{'name': '0BtsNVOAornvyNAPNOxHAmuDFR'\
55        'v7Dw8l',
56        'size-state': 'maximized',
57        'type': 'dock',
58        'view': {'area': 'tall',
59                 'constraint': None,
60                 'current_pages': [4],
61                 'full-screen': False,
62                 'notebook_display': 'normal',
63                 'notebook_percent': 0.2564559216384684,
64                 'override_title': None,
65                 'pagelist': [('source-assistant',
66                               'tall',
67                               2,
68                               {}),
69                              ('debug-stack',
70                               'tall',
71                               1,
72                               {}),
73                              ('browser',
74                               'tall',
75                               0,
76                               {}),
77                              ('indent',
78                               'tall',
79                               2,
80                               {}),
81                              ('debug-io',
82                               'tall',
83                               0,
84                               {}),
85                              ('project',
86                               'tall',
87                               0,
88                               {'tree-state': {'file-sort-method': 'by name',
89        'list-files-first': False,
90        'tree-states': {'deep': {'expanded-nodes': [(0,),
91        (0,
92         0)],
93                                 'selected-nodes': [(0,
94        0,
95        0)],
96                                 'top-node': (0,)}},
97        'tree-style': 'deep'}})],
98                 'primary_view_state': {'area': 'wide',
99        'constraint': None,
100        'current_pages': [3,
101                          1],
102        'notebook_display': 'normal',
103        'notebook_percent': 0.30000000000000004,
104        'override_title': None,
105        'pagelist': [('batch-search',
106                      'wide',
107                      0,
108                      {'fScope': {'fFileSetName': 'All Source Files',
109                                  'fLocation': None,
110                                  'fRecursive': True,
111                                  'fType': 'documentation'},
112                       'fSearchSpec': {'fEndPos': None,
113                                       'fIncludeLinenos': True,
114                                       'fInterpretBackslashes': False,
115                                       'fMatchCase': False,
116                                       'fOmitBinary': True,
117                                       'fRegexFlags': 42,
118                                       'fReplaceText': '',
119                                       'fReverse': False,
120                                       'fSearchText': u'default directory policy',
121                                       'fStartPos': 0,
122                                       'fStyle': 'text',
123                                       'fWholeWords': False,
124                                       'fWrap': True},
125                       'fUIOptions': {'fAutoBackground': True,
126                                      'fFilePrefix': 'short-file',
127                                      'fFindAfterReplace': True,
128                                      'fInSelection': False,
129                                      'fIncremental': True,
130                                      'fReplaceOnDisk': False,
131                                      'fShowFirstMatch': False,
132                                      'fShowLineno': True,
133                                      'fShowReplaceWidgets': False},
134                       'replace-entry-expanded': False,
135                       'search-entry-expanded': False}),
136                     ('interactive-search',
137                      'wide',
138                      0,
139                      {'fScope': {'fFileSetName': 'All Source Files',
140                                  'fLocation': None,
141                                  'fRecursive': True,
142                                  'fType': 'project-files'},
143                       'fSearchSpec': {'fEndPos': None,
144                                       'fIncludeLinenos': True,
145                                       'fInterpretBackslashes': False,
146                                       'fMatchCase': False,
147                                       'fOmitBinary': True,
148                                       'fRegexFlags': 42,
149                                       'fReplaceText': u'lastLineNum',
150                                       'fReverse': False,
151                                       'fSearchText': u'fileLength',
152                                       'fStartPos': 0,
153                                       'fStyle': 'text',
154                                       'fWholeWords': False,
155                                       'fWrap': True},
156                       'fUIOptions': {'fAutoBackground': True,
157                                      'fFilePrefix': 'short-file',
158                                      'fFindAfterReplace': True,
159                                      'fInSelection': False,
160                                      'fIncremental': True,
161                                      'fReplaceOnDisk': False,
162                                      'fShowFirstMatch': False,
163                                      'fShowLineno': True,
164                                      'fShowReplaceWidgets': True}}),
165                     ('debug-data',
166                      'wide',
167                      0,
168                      {}),
169                     ('debug-exceptions',
170                      'wide',
171                      0,
172                      {}),
173                     ('python-shell',
174                      'wide',
175                      2,
176                      {'active-range': (None,
177        -1,
178        -1),
179                       'attrib-starts': [],
180                       'code-line': '',
181                       'first-line': 0L,
182                       'folded-linenos': [],
183                       'history': {},
184                       'launch-id': None,
185                       'sel-line': 3L,
186                       'sel-line-start': 132L,
187                       'selection_end': 132L,
188                       'selection_start': 132L,
189                       'zoom': 0L}),
190                     ('messages',
191                      'wide',
192                      2,
193                      {'current-domain': 0}),
194                     ('os-command',
195                      'wide',
196                      1,
197                      {'last-percent': 0.8,
198                       'toolbox-percent': 1.0,
199                       'toolbox-tree-sel': ''})],
200        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('activitylog_watcher.py'),
201        {'attrib-starts': [('getLogEntries|0|',
202                            42)],
203         'code-line': '        desiredFields = "Activity Log.,"+name+","+cod'\
204                      'e+","+msg\n',
205         'first-line': 33L,
206         'folded-linenos': [],
207         'sel-line': 55L,
208         'sel-line-start': 1666L,
209         'selection_end': 1728L,
210         'selection_start': 1728L,
211         'zoom': 0L},
212        1564408367.809524],
213        [loc('cad_watcher.py'),
214         {'attrib-starts': [('getLogEntries|0|',
215                             24)],
216          'code-line': "            msgList = text_file.read().split('\\n')"\
217                       "\n",
218          'first-line': 38L,
219          'folded-linenos': [],
220          'sel-line': 52L,
221          'sel-line-start': 1613L,
222          'selection_end': 1613L,
223          'selection_start': 1613L,
224          'zoom': 0L},
225         1564408386.133798],
226        [loc('logging_service.py'),
227         {'attrib-starts': [('startup|0|',
228                             20)],
229          'code-line': '    #       Append simulation time and the log entri'\
230                       'es to the Output Buffer\n',
231          'first-line': 15L,
232          'folded-linenos': [],
233          'sel-line': 55L,
234          'sel-line-start': 1843L,
235          'selection_end': 1851L,
236          'selection_start': 1851L,
237          'zoom': 0L},
238         1564408404.830956],
239        [loc('cad_watcher.py'),
240         {'attrib-starts': [('getLogEntries|0|',
241                             24)],
242          'code-line': '            print pathToLog + " missing: assuming re'\
243                       'set."\n',
244          'first-line': 35L,
245          'folded-linenos': [],
246          'sel-line': 37L,
247          'sel-line-start': 1087L,
248          'selection_end': 1143L,
249          'selection_start': 1143L,
250          'zoom': 0L},
251         1564436972.290038],
252        [loc('logging_service.py'),
253         {'attrib-starts': [('startup|0|',
254                             20)],
255          'code-line': '    #       Append simulation time and the log entri'\
256                       'es to the Output Buffer\n',
257          'first-line': 0L,
258          'folded-linenos': [],
259          'sel-line': 55L,
260          'sel-line-start': 1843L,
261          'selection_end': 1851L,
262          'selection_start': 1851L,
263          'zoom': 0L},
264         1564436998.714792],
265        [loc('cad_watcher.py'),
266         {'attrib-starts': [('getLogEntries|0|',
267                             24)],
268          'code-line': '            print pathToLog + " missing: assuming re'\
269                       'set."\n',
270          'first-line': 20L,
271          'folded-linenos': [],
272          'sel-line': 37L,
273          'sel-line-start': 1087L,
274          'selection_end': 1143L,
275          'selection_start': 1143L,
276          'zoom': 0L},
277         1564437041.061947],
278        [loc('logging_service.py'),
279         {'attrib-starts': [('getSimTime|0|',
280                             13)],
281          'code-line': '\n',
282          'first-line': 0L,
283          'folded-linenos': [],
284          'sel-line': 24L,
285          'sel-line-start': 789L,
286          'selection_end': 789L,
287          'selection_start': 789L,
288          'zoom': 0L},
289         1564438151.528836],
290        [loc('cad_watcher.py'),
291         {'attrib-starts': [('getLogEntries|0|',
292                             24)],
293          'code-line': '            print pathToLog + " missing: assuming re'\
294                       'set."\n',
295          'first-line': 32L,
296          'folded-linenos': [],
297          'sel-line': 37L,
298          'sel-line-start': 1087L,
299          'selection_end': 1143L,
300          'selection_start': 1143L,
301          'zoom': 0L},
302         1564438185.449366],
303        [loc('logging_service.py'),
304         {'attrib-starts': [('getSimTime|0|',
305                             13)],
306          'code-line': '       print "Proceeding with previous time: ", toHM'\
307                       'S(seconds)\n',
308          'first-line': 0L,
309          'folded-linenos': [],
310          'sel-line': 21L,
311          'sel-line-start': 649L,
312          'selection_end': 649L,
313          'selection_start': 649L,
314          'zoom': 0L},
315         1564440773.252122],
316        [loc('activitylog_watcher.py'),
317         {'attrib-starts': [('getLogEntries|0|',
318                             42)],
319          'code-line': '        desiredFields = "Activity Log.,"+name+","+co'\
320                       'de+" "+msg\n',
321          'first-line': 0L,
322          'folded-linenos': [],
323          'sel-line': 55L,
324          'sel-line-start': 1666L,
325          'selection_end': 1723L,
326          'selection_start': 1723L,
327          'zoom': 0L},
328         1564453007.218601],
329        [loc('cad_watcher.py'),
330         {'attrib-starts': [('getLogEntries|0|',
331                             24)],
332          'code-line': '            print pathToLog + " missing: assuming re'\
333                       'set."\n',
334          'first-line': 0L,
335          'folded-linenos': [],
336          'sel-line': 37L,
337          'sel-line-start': 1087L,
338          'selection_end': 1143L,
339          'selection_start': 1143L,
340          'zoom': 0L},
341         1564453014.195405],
342        [loc('logging_service.py'),
343         {'attrib-starts': [('getSimTime|0|',
344                             13)],
345          'code-line': '       print "Proceeding with previous time: ", toHM'\
346                       'S(seconds)\n',
347          'first-line': 0L,
348          'folded-linenos': [],
349          'sel-line': 21L,
350          'sel-line-start': 649L,
351          'selection_end': 649L,
352          'selection_start': 649L,
353          'zoom': 0L},
354         1564453030.973979],
355        [loc('unknown:untitled-1.py'),
356         {'attrib-starts': [],
357          'code-line': '',
358          'first-line': 0L,
359          'folded-linenos': [],
360          'sel-line': 0L,
361          'sel-line-start': 0L,
362          'selection_end': 0L,
363          'selection_start': 0L,
364          'zoom': 0L},
365         1564453042.242505],
366        [loc('logging_service.py'),
367         {'attrib-starts': [('getSimTime|0|',
368                             13)],
369          'code-line': '       print "Proceeding with previous time: ", toHM'\
370                       'S(seconds)\n',
371          'first-line': 0L,
372          'folded-linenos': [],
373          'sel-line': 21L,
374          'sel-line-start': 649L,
375          'selection_end': 649L,
376          'selection_start': 649L,
377          'zoom': 0L},
378         1564453047.692926],
379        [loc('test_logging_service.py'),
380         {'attrib-starts': [('test_toHMS|0|',
381                             0)],
382          'code-line': '    ',
383          'first-line': 0L,
384          'folded-linenos': [],
385          'sel-line': 3L,
386          'sel-line-start': 57L,
387          'selection_end': 61L,
388          'selection_start': 61L,
389          'zoom': 0L},
390         1564453169.869372],
391        [loc('logging_service.py'),
392         {'attrib-starts': [('getSimTime|0|',
393                             13)],
394          'code-line': '       print "Proceeding with previous time: ", toHM'\
395                       'S(seconds)\n',
396          'first-line': 0L,
397          'folded-linenos': [],
398          'sel-line': 21L,
399          'sel-line-start': 649L,
400          'selection_end': 649L,
401          'selection_start': 649L,
402          'zoom': 0L},
403         1564453453.032643],
404        [loc('test_logging_service.py'),
405         {'attrib-starts': [('test_toHMS|0|',
406                             2)],
407          'code-line': '    ',
408          'first-line': 0L,
409          'folded-linenos': [],
410          'sel-line': 7L,
411          'sel-line-start': 194L,
412          'selection_end': 198L,
413          'selection_start': 198L,
414          'zoom': 0L},
415         1564453867.007001],
416        [loc('test_logging_service.py'),
417         {'attrib-starts': [('test_toHMS|0|',
418                             2)],
419          'code-line': 'def test_toHMS():\n',
420          'first-line': 0L,
421          'folded-linenos': [],
422          'sel-line': 2L,
423          'sel-line-start': 35L,
424          'selection_end': 49L,
425          'selection_start': 39L,
426          'zoom': 0L},
427         1564453872.826719],
428        [loc('logging_service.py'),
429         {'attrib-starts': [('getSimTime|0|',
430                             13)],
431          'code-line': '       print "Proceeding with previous time: ", toHM'\
432                       'S(seconds)\n',
433          'first-line': 30L,
434          'folded-linenos': [],
435          'sel-line': 21L,
436          'sel-line-start': 649L,
437          'selection_end': 649L,
438          'selection_start': 649L,
439          'zoom': 0L},
440         1564453933.136133],
441        [loc('test_logging_service.py'),
442         {'attrib-starts': [('test_toHMS|0|',
443                             2)],
444          'code-line': '    assert toHMS(3601) == "1:00:01"\n',
445          'first-line': 0L,
446          'folded-linenos': [],
447          'sel-line': 6L,
448          'sel-line-start': 158L,
449          'selection_end': 192L,
450          'selection_start': 192L,
451          'zoom': 0L},
452         1564454686.591132]],
453        20),
454        'current-loc': loc('cad_watcher.py'),
455        'editor-state-list': [(loc('activitylog_watcher.py'),
456                               {'attrib-starts': [('getLogEntries|0|',
457        42)],
458                                'code-line': '        desiredFields = "Activ'\
459        'ity Log.,"+name+","+code+" "+msg\n',
460                                'first-line': 0L,
461                                'folded-linenos': [],
462                                'sel-line': 55L,
463                                'sel-line-start': 1666L,
464                                'selection_end': 1723L,
465                                'selection_start': 1723L,
466                                'zoom': 0L}),
467                              (loc('cad_watcher.py'),
468                               {'attrib-starts': [('getLogEntries|0|',
469        24)],
470                                'code-line': '            print pathToLog + '\
471        '" missing: assuming reset."\n',
472                                'first-line': 45L,
473                                'folded-linenos': [],
474                                'sel-line': 37L,
475                                'sel-line-start': 1087L,
476                                'selection_end': 1143L,
477                                'selection_start': 1143L,
478                                'zoom': 0L}),
479                              (loc('cms_watcher.py'),
480                               {'attrib-starts': [('readFile|0|',
481        18)],
482                                'code-line': ' \n',
483                                'first-line': 6L,
484                                'folded-linenos': [],
485                                'sel-line': 21L,
486                                'sel-line-start': 564L,
487                                'selection_end': 565L,
488                                'selection_start': 565L,
489                                'zoom': 0L}),
490                              (loc('../../../config/logging_service.cfg'),
491                               {'attrib-starts': [],
492                                'code-line': '[Paths]\n',
493                                'first-line': 0L,
494                                'folded-linenos': [],
495                                'sel-line': 0L,
496                                'sel-line-start': 0L,
497                                'selection_end': 0L,
498                                'selection_start': 0L,
499                                'zoom': 0L}),
500                              (loc('logging_service.py'),
501                               {'attrib-starts': [('getSimTime|0|',
502        13)],
503                                'code-line': '       print "Proceeding with '\
504        'previous time: ", toHMS(seconds)\n',
505                                'first-line': 30L,
506                                'folded-linenos': [],
507                                'sel-line': 21L,
508                                'sel-line-start': 649L,
509                                'selection_end': 649L,
510                                'selection_start': 649L,
511                                'zoom': 0L}),
512                              (loc('test_logging_service.py'),
513                               {'attrib-starts': [('test_toHMS|0|',
514        2)],
515                                'code-line': '    assert toHMS(3601) == "1:0'\
516        '0:01"\n',
517                                'first-line': 0L,
518                                'folded-linenos': [],
519                                'sel-line': 6L,
520                                'sel-line-start': 158L,
521                                'selection_end': 192L,
522                                'selection_start': 192L,
523                                'zoom': 0L}),
524                              (loc('__main__.py'),
525                               {'attrib-starts': [],
526                                'code-line': 'import logging_service, os, Co'\
527        'nfigParser\n',
528                                'first-line': 0L,
529                                'folded-linenos': [],
530                                'sel-line': 0L,
531                                'sel-line-start': 0L,
532                                'selection_end': 40L,
533                                'selection_start': 28L,
534                                'zoom': 0L})],
535        'has-focus': True,
536        'locked': False},
537        [loc('activitylog_watcher.py'),
538         loc('cad_watcher.py'),
539         loc('cms_watcher.py'),
540         loc('../../../config/logging_service.cfg'),
541         loc('logging_service.py'),
542         loc('test_logging_service.py'),
543         loc('__main__.py')]),
544                               'open_files': [u'../../../config/logging_service.cfg',
545        u'__main__.py',
546        u'cms_watcher.py',
547        u'activitylog_watcher.py',
548        u'logging_service.py',
549        u'test_logging_service.py',
550        u'cad_watcher.py']},
551        'saved_notebook_display': None,
552        'split_percents': {0: 0.5},
553        'splits': 2,
554        'tab_location': 'top',
555        'traversal_pos': ((0,
556                           3),
557                          1564454637.847513),
558        'user_data': {}},
559                 'saved_notebook_display': None,
560                 'split_percents': {},
561                 'splits': 1,
562                 'tab_location': 'left',
563                 'traversal_pos': ((0,
564                                    4),
565                                   1564454677.406196),
566                 'user_data': {}},
567        'window-alloc': (29,
568                         0,
569                         1197,
570                         722)}]}
571guimgr.recent-documents = [loc('cad_watcher.py'),
572                           loc('test_logging_service.py'),
573                           loc('logging_service.py'),
574                           loc('activitylog_watcher.py'),
575                           loc('__main__.py'),
576                           loc('cms_watcher.py'),
577                           loc('../../../config/logging_service.cfg')]
578guimgr.visual-state = {loc('get_app_properties.py'): {'attrib-starts': [],
579        'code-line': '',
580        'first-line': 0L,
581        'folded-linenos': [],
582        'sel-line': 0L,
583        'sel-line-start': 0L,
584        'selection_end': 0L,
585        'selection_start': 0L,
586        'zoom': 0L},
587                       loc('get_revision'): {'attrib-starts': [],
588        'code-line': '',
589        'first-line': 0L,
590        'folded-linenos': [],
591        'sel-line': 18L,
592        'sel-line-start': 455L,
593        'selection_end': 455L,
594        'selection_start': 455L,
595        'zoom': 0L},
596                       loc('../../../../../../../usr/lib/python2.7/ConfigParser.py'): {'a'\
597        'ttrib-starts': [('ConfigParser|0|',
598                          85),
599                         ('ConfigParser|0|.get|0|',
600                          589)],
601        'code-line': '                raise NoSectionError(section)\n',
602        'first-line': 597L,
603        'folded-linenos': [],
604        'sel-line': 606L,
605        'sel-line-start': 22028L,
606        'selection_end': 22028L,
607        'selection_start': 22028L,
608        'zoom': 0L},
609                       loc('../../../../../../../../usr/lib/python2.7/ConfigParser.py'): {'a'\
610        'ttrib-starts': [('ConfigParser|0|',
611                          85),
612                         ('ConfigParser|0|.get|0|',
613                          589)],
614        'code-line': '                raise NoSectionError(section)\n',
615        'first-line': 601L,
616        'folded-linenos': [],
617        'sel-line': 606L,
618        'sel-line-start': 22028L,
619        'selection_end': 22028L,
620        'selection_start': 22028L,
621        'zoom': 0L},
622                       loc('../../../../../../../../usr/lib/python2.7/genericpath.py'): {'a'\
623        'ttrib-starts': [('getsize|0|',
624                          54)],
625        'code-line': '    return os.stat(filename).st_size\n',
626        'first-line': 39L,
627        'folded-linenos': [],
628        'sel-line': 56L,
629        'sel-line-start': 1506L,
630        'selection_end': 1506L,
631        'selection_start': 1506L,
632        'zoom': 0L},
633                       loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'): {'a'\
634        'ttrib-starts': [('JSONDecoder|0|',
635                          271),
636                         ('JSONDecoder|0|.raw_decode|0|',
637                          369)],
638        'code-line': '            obj, end = self.scan_once(s, idx)\n',
639        'first-line': 370L,
640        'folded-linenos': [],
641        'sel-line': 379L,
642        'sel-line-start': 13534L,
643        'selection_end': 13534L,
644        'selection_start': 13534L,
645        'zoom': 0L}}
646proj.build-cmd = {None: ('default',
647                         None)}
648proj.env-vars = {None: ('default',
649                        [u''])}
650search.search-history = [u'default directory policy']
Note: See TracBrowser for help on using the repository browser.