Skip to content

Commit b45b4a3

Browse files
committed
Switch tests runner to nose
Enable coverage and add relevant files to print a nice report.
1 parent 34d7793 commit b45b4a3

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.coveragerc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# http://nedbatchelder.com/code/coverage/config.html#config
2+
3+
[run]
4+
branch = True
5+
omit = */tests/*
6+
7+
[report]
8+
omit = */tests/*

setup.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[nosetests]
2+
match = ^test_
3+
cover-package = fluent
4+
with-coverage = 1
5+
cover-erase = 1
6+
cover-branches = 1
7+
cover-inclusive = 1
8+
cover-min-percentage = 70

tests/test_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
class TestEvent(unittest.TestCase):
12-
def testLogging(self):
12+
def test_logging(self):
1313
# send event with tag app.follow
1414
event.Event('follow', {
1515
'from': 'userA',

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ envlist = py26, py27, py32, py33, py34
44
skip_missing_interpreters = True
55

66
[testenv]
7-
commands=python setup.py test
7+
deps = nose
8+
coverage
9+
commands = python setup.py nosetests

0 commit comments

Comments
 (0)