From 2b013624675b6913a43d697b566febc15572f295 Mon Sep 17 00:00:00 2001 From: jason kirtland Date: Tue, 29 Aug 2017 11:26:30 -0700 Subject: Feature: Move tests from nose to pytest --- .travis.yml | 2 +- tests/test_signals.py | 6 +++--- tox.ini | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3724399..6a19161 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ install: - "pip install ." # command to run tests -script: nosetests +script: pytest diff --git a/tests/test_signals.py b/tests/test_signals.py index a1172ed..d359502 100644 --- a/tests/test_signals.py +++ b/tests/test_signals.py @@ -4,7 +4,7 @@ import time import blinker -from nose.tools import assert_raises +import pytest jython = sys.platform.startswith('java') @@ -227,7 +227,7 @@ def test_meta_connect_failure(): pass sig = blinker.Signal() - assert_raises(TypeError, sig.connect, receiver) + pytest.raises(TypeError, sig.connect, receiver) assert not sig.receivers assert not sig._by_receiver assert sig._by_sender == {blinker.base.ANY_ID: set()} @@ -492,4 +492,4 @@ if sys.version_info < (2, 5): sig = blinker.Signal() receiver = lambda sender: None - assert_raises(RuntimeError, sig.connected_to, receiver) + pytest.raises(RuntimeError, sig.connected_to, receiver) diff --git a/tox.ini b/tox.ini index 5046326..43d4758 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,6 @@ envlist = py25,py26,py27,py30,py31,py32,py33,py34,py35,jython [testenv] -deps=nose -commands=nosetests +deps=pytest +commands=py.test -- cgit v1.2.1