Skip to content

Commit

Permalink
Format tests the standard nose way
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Feb 4, 2012
1 parent dd95fe7 commit 4f6997f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions nose_json/plugin.py
Expand Up @@ -6,7 +6,6 @@
:license: BSD
"""
import codecs
import inspect
import simplejson
import traceback
from time import time
Expand Down Expand Up @@ -79,7 +78,7 @@ def addError(self, test, err, capt=None):
tb = ''.join(traceback.format_exception(*err))
id = test.id()
self.results.append({
'classname': id_split(id)[0],
'classname': ':'.join(id_split(id)[0].rsplit('.', 1)),
'name': id_split(id)[-1],
'time': taken,
'type': type,
Expand All @@ -94,7 +93,7 @@ def addFailure(self, test, err, capt=None, tb_info=None):
self.stats['failures'] += 1
id = test.id()
self.results.append({
'classname': id_split(id)[0],
'classname': ':'.join(id_split(id)[0].rsplit('.', 1)),
'name': id_split(id)[-1],
'time': taken,
'type': 'failure',
Expand All @@ -108,7 +107,7 @@ def addSuccess(self, test, capt=None):
self.stats['passes'] += 1
id = test.id()
self.results.append({
'classname': id_split(id)[0],
'classname': ':'.join(id_split(id)[0].rsplit('.', 1)),
'name': id_split(id)[-1],
'time': taken,
'type': 'success',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -7,7 +7,7 @@

setup(
name='nose-json',
version='0.2.1',
version='0.2.2',
author='David Cramer',
author_email='dcramer@gmail.com',
description='A JSON report plugin for Nose.',
Expand Down

0 comments on commit 4f6997f

Please sign in to comment.