Permalink
Browse files

Format tests the standard nose way

  • Loading branch information...
1 parent dd95fe7 commit 4f6997f28b347b5e22c989a6a756d5b0ae4a487c @dcramer committed Feb 4, 2012
Showing with 4 additions and 5 deletions.
  1. +3 −4 nose_json/plugin.py
  2. +1 −1 setup.py
View
@@ -6,7 +6,6 @@
:license: BSD
"""
import codecs
-import inspect
import simplejson
import traceback
from time import time
@@ -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,
@@ -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',
@@ -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',
View
@@ -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.',

0 comments on commit 4f6997f

Please sign in to comment.