Skip to content

Commit cc6b033

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 1ebf5ea commit cc6b033

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
@@ -224,6 +224,12 @@ def run(self, result=None, **kwargs):
224224
finally:
225225
result.stopTest(self)
226226

227+
def __str__(self):
228+
module = self.__class__.__module__
229+
if '.' in module:
230+
module = module[module.rfind('.')+1:] # strip off all but the last component
231+
return "%s.py: %s" % (module, self._testMethodName)
232+
227233

228234
class OSGTestResult(unittest.TestResult):
229235
"""

0 commit comments

Comments
 (0)