"""
unittest.TestCase.__init__(self, methodName)
testMethod = getattr(self, methodName)
- self.script = testMethod.__doc__
+ self.script = sibpath(sys.modules[self.__class__.__module__].__file__,
+ testMethod.__doc__)
def countTestCases(self):
return 1
class SampleExecTestCase(subunit.ExecTestCase):
def test_sample_method(self):
- """./python/subunit/tests/sample-script.py"""
+ """sample-script.py"""
# the sample script runs three tests, one each
# that fails, errors and succeeds
def test_construct(self):
test = self.SampleExecTestCase("test_sample_method")
- self.assertEqual(test.script, "./python/subunit/tests/sample-script.py")
+ self.assertEqual(test.script,
+ subunit.sibpath(__file__, 'sample-script.py'))
def test_run(self):
runner = MockTestProtocolServerClient()
class DoExecTestCase(subunit.ExecTestCase):
def test_working_script(self):
- """./python/subunit/tests/sample-two-script.py"""
+ """sample-two-script.py"""
class TestIsolatedTestCase(unittest.TestCase):