0.1.4
This commit is contained in:
parent
9cd6ee7f66
commit
552c69b2ee
@ -1,5 +1,5 @@
|
|||||||
# Steady Mark
|
# Steady Mark
|
||||||
> version 0.1.3
|
> version 0.1.4
|
||||||
[![Build Status](https://secure.travis-ci.org/gabrielfalcao/steadymark.png)](http://travis-ci.org/gabrielfalcao/steadymark)
|
[![Build Status](https://secure.travis-ci.org/gabrielfalcao/steadymark.png)](http://travis-ci.org/gabrielfalcao/steadymark)
|
||||||
|
|
||||||
# Turning your github readme files into python test suites since 2012
|
# Turning your github readme files into python test suites since 2012
|
||||||
@ -61,11 +61,11 @@ Just run with:
|
|||||||
$ steadymark README.md
|
$ steadymark README.md
|
||||||
```
|
```
|
||||||
|
|
||||||
# Steadymark is on version 0.1.3
|
# Steadymark is on version 0.1.4
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from steadymark import version
|
from steadymark import version
|
||||||
assert version == '0.1.3'
|
assert version == '0.1.4'
|
||||||
```
|
```
|
||||||
|
|
||||||
# Steadymark strips headers
|
# Steadymark strips headers
|
||||||
|
2
setup.py
2
setup.py
@ -38,7 +38,7 @@ def get_packages():
|
|||||||
return packages
|
return packages
|
||||||
|
|
||||||
setup(name='steadymark',
|
setup(name='steadymark',
|
||||||
version='0.1.3',
|
version='0.1.4',
|
||||||
description=(u'Markdown-based test runner for python. '
|
description=(u'Markdown-based test runner for python. '
|
||||||
'Good for github projects'),
|
'Good for github projects'),
|
||||||
author=u'Gabriel Falcao',
|
author=u'Gabriel Falcao',
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
# OTHER DEALINGS IN THE SOFTWARE.
|
# OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
version = '0.1.3'
|
version = '0.1.4'
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -117,26 +117,26 @@ class READMETestRunner(BaseRenderer):
|
|||||||
self.print_green('\xe2\x9c\x93 {0}'.format(self.format_ms(ms)))
|
self.print_green('\xe2\x9c\x93 {0}'.format(self.format_ms(ms)))
|
||||||
else:
|
else:
|
||||||
self.print_red('\xe2\x9c\x97 {0}'.format(self.format_ms(ms)))
|
self.print_red('\xe2\x9c\x97 {0}'.format(self.format_ms(ms)))
|
||||||
exc, name, tb = failure
|
exc, exc_instance, tb = failure
|
||||||
tb = tb.tb_next
|
tb = tb.tb_next
|
||||||
|
formatted_tb = self.format_traceback(title, exc_instance)
|
||||||
|
|
||||||
if tb:
|
if tb:
|
||||||
self.print_red(traceback.format_exc(exc))
|
|
||||||
line = lines[tb.tb_lineno - 1]
|
line = lines[tb.tb_lineno - 1]
|
||||||
formatted_tb = traceback.format_exc(name)
|
|
||||||
self.print_red("{0} {1}".format(formatted_tb, line))
|
self.print_red("{0} {1}".format(formatted_tb, line))
|
||||||
else:
|
elif issubclass(exc, SyntaxError):
|
||||||
if issubclass(exc, SyntaxError):
|
self.print_red(formatted_tb, indentation=2)
|
||||||
formatted_tb = traceback.format_exc(name)
|
|
||||||
formatted_tb = formatted_tb.replace(
|
|
||||||
'File "@STEADYMARK@',
|
|
||||||
'In the test "@STEADYMARK@',
|
|
||||||
)
|
|
||||||
formatted_tb = formatted_tb.replace(
|
|
||||||
'@STEADYMARK@', title)
|
|
||||||
self.print_red(formatted_tb, indentation=2)
|
|
||||||
|
|
||||||
sys.exit(int(failed))
|
sys.exit(int(failed))
|
||||||
|
|
||||||
|
def format_traceback(self, title, exception):
|
||||||
|
formatted_tb = traceback.format_exc(exception)
|
||||||
|
formatted_tb = formatted_tb.replace(
|
||||||
|
'File "@STEADYMARK@',
|
||||||
|
'In the test "@STEADYMARK@',
|
||||||
|
)
|
||||||
|
return formatted_tb.replace(
|
||||||
|
'@STEADYMARK@', title)
|
||||||
|
|
||||||
class Runner(object):
|
class Runner(object):
|
||||||
def __init__(self, filename=None, text=u''):
|
def __init__(self, filename=None, text=u''):
|
||||||
|
Loading…
Reference in New Issue
Block a user