Permalink
Browse files

Improvements on how the results are show

  • Loading branch information...
1 parent abe5cb6 commit f5fd04ec912de237cce2ce5b9c78c8047e89a35e @douglas committed Nov 1, 2011
Showing with 7 additions and 2 deletions.
  1. +7 −2 spec/plugin.py
View
@@ -113,7 +113,8 @@ def camelcase2spec(name):
def camelcaseDescription(object):
- return object.__doc__ or camelcase2spec(object.__name__)
+ description = object.__doc__ or camelcase2spec(object.__name__)
+ return description.strip()
def underscoredDescription(object):
@@ -129,7 +130,11 @@ def noseMethodDescription(test):
def unittestMethodDescription(test):
- return test._testMethodDoc or underscored2spec(test._testMethodName)
+ if test._testMethodDoc is None:
+ return underscored2spec(test._testMethodName)
+ else:
+ description = test._testMethodDoc.split("\n")
+ return "".join([text.strip() for text in description])
def noseFunctionDescription(test):

0 comments on commit f5fd04e

Please sign in to comment.