This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bcsaller
Recipients
Date 2001-05-11.04:53:51
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Some times it is helpful to know the directory that 
tests are being run from so that they can collect 
their test data. If for example you have a parser and 
some test files finding those file reguardless of how 
the test is called is helpful to the test author.

TestCase has been extended to allow for this. When a 
testCase instance needs to find a data file relative 
to itself it can now say

class TestFoo(TestCase):
  def checkFoo(self):   
   dirname = self.getPath()
   # or
   filename = self.getPath("foo.data")

If TestFoo.py is in /home/user/python/tests then
dirname == /home/user/python/tests 
and 
filename == /home/user/python/tests/foo.data


There is not cost if this feature is not invoked.
History
Date User Action Args
2007-08-23 15:05:41adminlinkissue423224 messages
2007-08-23 15:05:41admincreate