not showing test duration if ms < 1000

This commit is contained in:
Gabriel Falcao 2012-07-30 15:52:22 -04:00
parent 61e445e02a
commit fec0bc135f
2 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,7 @@ assert u"FOOBAR".lower() == "foobar"
## python can add numbers
```python
assert (2 + 2) == 5, 'oops baby'
assert (2 + 2) == 4, 'oops baby'
```
# Start using steady mark now!

View File

@ -65,6 +65,10 @@ class READMETestRunner(BaseRenderer):
print "\033[1;32m{0}\033[0m".format(text)
def format_ms(self, ms):
ms = int(ms)
if ms < 1000:
return ""
return "\033[1;33m{0}ms\033[0m".format(ms)
def postprocess(self, full_document):