Skip to content

Commit eaa0107

Browse files
committed
Shorten output by not displaying full path to file
Also put the file name before the test name. The resulting output will look like test_760_tomcat.py: test_01_stop_tomcat ... okskip
1 parent 0d976f9 commit eaa0107

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

osgtest/library/osgunittest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ def run(self, result=None, **kwargs):
245245
finally:
246246
result.stopTest(self)
247247

248+
def __str__(self):
249+
module = self.__class__.__module__
250+
if '.' in module:
251+
module = module[module.rfind('.')+1:] # strip off all but the last component
252+
return "%s.py: %s" % (module, self._testMethodName)
253+
248254

249255
class OSGTestResult(unittest.TestResult):
250256
"""

0 commit comments

Comments
 (0)