diff options
| author | Jonathan Lange <jml@mumak.net> | 2007-01-14 17:35:05 +1100 |
|---|---|---|
| committer | Jonathan Lange <jml@mumak.net> | 2007-01-14 17:35:05 +1100 |
| commit | f7c5ccbc7732ff89c07da3bb822d7ab95542ca7c (patch) | |
| tree | 6fd93e243a812de0179d3d63382a21ea373cb51f /python/subunit/tests | |
| parent | 46661c83dee2138c9918798f36d8b40edab5ffad (diff) | |
| parent | cb1a0a2e928473ea68649c09b3691886ac93b57a (diff) | |
| download | subunit-git-f7c5ccbc7732ff89c07da3bb822d7ab95542ca7c.tar.gz | |
Make ExecTestCase test docstrings/paths relative to the test module they
are defined in.
Diffstat (limited to 'python/subunit/tests')
| -rw-r--r-- | python/subunit/tests/test_test_protocol.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/python/subunit/tests/test_test_protocol.py b/python/subunit/tests/test_test_protocol.py index 2530f25..1ee4886 100644 --- a/python/subunit/tests/test_test_protocol.py +++ b/python/subunit/tests/test_test_protocol.py @@ -19,6 +19,7 @@ import unittest from StringIO import StringIO +import os import subunit import sys @@ -561,14 +562,15 @@ class TestExecTestCase(unittest.TestCase): 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.join_dir(__file__, 'sample-script.py')) def test_run(self): runner = MockTestProtocolServerClient() @@ -593,11 +595,16 @@ class TestExecTestCase(unittest.TestCase): def test_count_test_cases(self): """TODO run the child process and count responses to determine the count.""" + def test_sibpath(self): + sibling = subunit.sibpath(__file__, 'foo') + expected = '%s/foo' % (os.path.split(__file__)[0],) + self.assertEqual(sibling, expected) + class DoExecTestCase(subunit.ExecTestCase): def test_working_script(self): - """./python/subunit/tests/sample-two-script.py""" + """sample-two-script.py""" class TestIsolatedTestCase(unittest.TestCase): |
