Mercurial > bitten > bitten-test
changeset 133:07505cab4ba6
Fix unit test for {{{<python:unittest>}}} recipe command.
author | cmlenz |
---|---|
date | Fri, 12 Aug 2005 22:42:55 +0000 |
parents | c43b72672dde |
children | 1a1a294ce10e |
files | bitten/build/pythontools.py bitten/build/tests/pythontools.py |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/build/pythontools.py +++ b/bitten/build/pythontools.py @@ -100,6 +100,7 @@ modname = match.group(3) cov = int(match.group(2)) if filename.startswith(ctxt.basedir): + filename = filename[len(ctxt.basedir) + 1:] module = xmlio.Element('coverage', file=filename, module=modname, percentage=cov) coverage_path = ctxt.resolve(coverdir,
--- a/bitten/build/tests/pythontools.py +++ b/bitten/build/tests/pythontools.py @@ -88,9 +88,10 @@ self.results_xml.write('<?xml version="1.0"?>' '<unittest-results>' '<test duration="0.12" status="success"' - ' file="bar_test.py"' + ' file="%s"' ' name="test_foo (pkg.BarTestCase)"/>' - '</unittest-results>') + '</unittest-results>' + % os.path.join(self.ctxt.basedir, 'bar_test.py')) self.results_xml.close() pythontools.unittest(self.ctxt, self.results_xml.name) type, function, xml = self.ctxt.output.pop()