<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt">I would appreciate of you can give me some pointers regarding the following issue.<br><br>I am running nosetests with command line option like --psql --mysql --qa, and other options.<br><br>when the tests fail, i get something like:<br><br>&nbsp;=======================================<br>ERROR: testTSyncRes2 (transactionstest.TransactionsTest)<br>&nbsp;----------------------------------------------------------------------<br>Traceback (most recent call last):<br>File "/home/k/hg/Pr-test/pr-test/decorators.py", line 34, in wrapper<br>return func(self)<br>File "/home/k/hg/Pr-test/pr-test/fixtures.py", line 105, in wrapper<br>&nbsp;func(self)<br>File "/home/k/hg/Pr-test/pr-test/servertest/transactionstest.py", line 668, in testTSyncRes2 self.tSyncRes2()<br>File "/home/k/hg/Pr-test/pr-test/servertest/transactionstest.py", line 697, in
 tSyncRes2 remoteConfig, False) <br>File "/home/k/hg/Pr/pr/server/classes/common/community.py", line 680, in tSyncRes1<br>&nbsp;raise errors.SyncError('Remote server error: ' + str(e))<br>&nbsp;SyncError: Remote server error: [Errno 13] Permission denied '/tmp/synclocktestTSyncRes2/session'<br><br>Now looking at the stack trace, i dont know if it was caused when using<br>--mysql or --psql command line option. since the same test runs for these options.<br><br>1. Is there a nosetests plugin that can append the command line context to Traceback ?<br>2. Is the best way to resolve this is to write a plugin ?if i were to write a plugin, i need a bit of help where to start. Like :<br><br>- Should i parse the command line options in a list and with Stack print out the list that was being used ? not sure how i would go about doing that.<br>I looked at :<br>1. /http://docs.python.org/library/traceback.html?#traceback.print_stack<br>2. Maybe add addError(test,
 err, context) without changing nose source.<br>3. get env.get('--mysql','--psql','--qa')<br><br>&nbsp;def options(self, parser, env):<br>&nbsp; &nbsp; &nbsp; &nbsp; """Sets additional command line options."""<br>&nbsp; &nbsp; &nbsp; &nbsp; Plugin.options(self, parser, env)<br>&nbsp; &nbsp; &nbsp; &nbsp; parser.add_option(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '--xunit-file', action='store',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dest='xunit_file', metavar="FILE",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default=env.get('NOSE_XUNIT_FILE', 'nosetests.xml'),<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; help=("Path to xml file to store the xunit report in. "<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Default is nosetests.xml in the working directory "<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "[NOSE_XUNIT_FILE]"))<br>Thanks,<br>&nbsp;-Kamal.<br><br></div></body></html>