On Tue, 26 Sep 2006, Mikeal Rogers wrote:

Does anyone object to an addition to Application.py line 323 like this;

      class _pyLog(wx.PyLog):
          def DoLogString(self, message, timestamp):
              sys.stderr.write('wx output: ')
              sys.stderr.write(message)
              sys.stderr.write('\n')
              import tools.cats.framework.logger
              logger.wxerr(message)

And in the logger.wxerr code we'll assume that any output form wx is a failure report and report the failure.

Yes, this is backwards. tools.cats.framework should import Application and do the hooking in its own code by wrapping another log thingie like is done by the above _pyLog class.

It is not OK for chandler code to import tools/cats code.

Andi..


-Mikeal

On Sep 26, 2006, at 10:49 AM, Andi Vajda wrote:


On Tue, 26 Sep 2006, John Anderson wrote:

One possible you should check for is the following:

When wxWidgets (or perhaps other C++) calls Python, if the Python raises an exception it will not propagate across the C++ call boundary to the Python layer above it. However, it should print the exception (probably to stderr), so as long as writing to stderr causes a test to fail you should be catching it.

These exceptions are logged but not reported as exceptions back to python.
The functional tests could hook these though and be told about them just as they are being logged. Look at the code in Application.py around line 323 where this logging is setup.

Andi..


John

Dan Steinicke wrote:
John,
As Heikki says we already have bugs on this. I have been looking at the problem of the test not failing when an exception is being thrown. When --catch=test as it does on the tinderboxes the entire test is wrapped in a try/ except block. Yet some exceptions are still not getting caught. I am unsure what else to do. I would welcome ideas on how to better catch exceptions during testing. Mikeal is looking into this as well but since he is away at CalConnect this week he may not be able to do much on it.
Dan
John Anderson wrote:
I'm currently not able to successfully run the functional tests on Windows with no added changes, even though they seem to be passing on the tinderbox. See the failure below
Has anyone else seen this?
John
+++ TestSharing:TestSharing +++
<DBRepositoryView: MainThread (42)> committed 14 items (13 kbytes) in 0:00:00.094000, 149 items/s (138 kbytes/s) <DBRepositoryView: MainThread (43)> committed 293 items (210 kbytes) in 0:00:00.594000, 493 items/s (354 kbytes/s) <DBRepositoryView: viewpool-0 (44)> committed 21 items (31 kbytes) in 0:00:00.562000, 37 items/s (55 kbytes/s) <DBRepositoryView: viewpool-0 (45)> committed 1 items (0 kbytes) in 0:00:00.031000, 32 items/s (0 kbytes/s) <DBRepositoryView: MainThread (46)> committed 96 items (42 kbytes) in 0:00:00.156000, 615 items/s (269 kbytes/s) <DBRepositoryView: MainThread (47)> committed 248 items (133 kbytes) in 0:00:00.438000, 566 items/s (304 kbytes/s)
<DBRepositoryView: Lucene (16)> indexed 8 items in 0:00:00.313000
<DBRepositoryView: Lucene (17)> indexed 8 items in 0:00:00.250000
<DBRepositoryView: Lucene (18)> indexed 15 items in 0:00:00.328000
<DBRepositoryView: Lucene (19)> indexed 7 items in 0:00:00.219000
<DBRepositoryView: viewpool-0 (48)> committed 42 items (94 kbytes) in 0:00:00.765000, 55 items/s (123 kbytes/s)
<DBRepositoryView: Lucene (20)> indexed 6 items in 0:00:00.797000
<DBRepositoryView: viewpool-0 (49)> committed 2 items (1 kbytes) in 0:00:00.188000, 11 items/s (5 kbytes/s)
<DBRepositoryView: Lucene (21)> indexed 6 items in 0:00:00.266000
<DBRepositoryView: viewpool-0 (50)> committed 2 items (1 kbytes) in 0:00:00.235000, 9 items/s (4 kbytes/s)
<DBRepositoryView: Lucene (22)> indexed 18 items in 0:00:00.422000
<DBRepositoryView: Lucene (23)> indexed 11 items in 0:00:00.500000
<DBRepositoryView: Lucene (24)> indexed 9 items in 0:00:00.140000
<DBRepositoryView: Lucene (25)> indexed 9 items in 0:00:00.204000
<DBRepositoryView: Lucene (26)> indexed 9 items in 0:00:00.156000
Traceback (most recent call last):
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 62, in with_sync
  method(*args, **kwds)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Table.py", line 292, in OnRangeSelect
  blockItem.PostSelectItems()
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Table.py", line 786, in PostSelectItems
  {'items': items,
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 216, in postEventByName
  return self.postEventByNameWithSender (eventName, args, sender=self)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 210, in postEventByNameWithSender
  return theClass.post (event, args, sender)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 190, in post
  hookItem.dispatchEvent (event, Block.depth)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 1035, in dispatchEvent
  lambda child: (child is not None and
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 979, in broadcast
  broadcast (child, methodName, event, childTest)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 979, in broadcast
  broadcast (child, methodName, event, childTest)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 979, in broadcast
  broadcast (child, methodName, event, childTest)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 976, in broadcast
  callMethod (block, methodName, event)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 939, in callNamedMethod
  event.arguments ['results'] = member (blockOrWidget, event)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\BranchPoint.py", line 123, in onSelectItemsEvent
  widget.wxSynchronizeWidget ()
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\BranchPoint.py", line 66, in wxSynchronizeWidget
  self.blockItem.installTreeOfBlocks()
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\BranchPoint.py", line 213, in installTreeOfBlocks
  IgnoreSynchronizeWidget(False, Rerender)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 80, in IgnoreSynchronizeWidget
  result = method(*args, **kwds)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\BranchPoint.py", line 199, in Rerender
  newView.postEventByName("SetContents", {
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 216, in postEventByName
  return self.postEventByNameWithSender (eventName, args, sender=self)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 210, in postEventByNameWithSender
  return theClass.post (event, args, sender)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 190, in post
  hookItem.dispatchEvent (event, Block.depth)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 1035, in dispatchEvent
  lambda child: (child is not None and
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 979, in broadcast
  broadcast (child, methodName, event, childTest)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 976, in broadcast
  callMethod (block, methodName, event)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Block.py", line 939, in callNamedMethod
  event.arguments ['results'] = member (blockOrWidget, event)
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Table.py", line 767, in onSetContentsEvent
  self.PostSelectItems()
File "d:\John\osaf\chandler\parcels\osaf\framework\blocks\Table.py", line 783, in PostSelectItems
  items = list(self.contents.iterSelection())
File "d:\John\osaf\chandler\parcels\osaf\pim\collections.py", line 819, in iterSelection
  ranges = self.getSelectionRanges()
File "d:\John\osaf\chandler\parcels\osaf\pim\collections.py", line 752, in getSelectionRanges
  return self.getCollectionIndex().getRanges()
File "d:\John\osaf\chandler\parcels\osaf\pim\collections.py", line 674, in getCollectionIndex
  self.addIndex(indexName, 'attribute', attributes=attributes)
File "d:\John\osaf\chandler\repository\item\Indexed.py", line 122, in addIndex
  index = self._createIndex(indexType, **kwds)
File "d:\John\osaf\chandler\repository\item\Indexed.py", line 254, in _createIndex
  return AttributeIndex(self, self._createIndex('numeric', **kwds),
File "d:\John\osaf\chandler\repository\item\Indexed.py", line 251, in _createIndex
  return self._getView()._createNumericIndex(**kwds)
AttributeError: 'NoneType' object has no attribute '_createNumericIndex'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to