diff --git a/enocean/protocol/tests/test_packet_creation.py b/enocean/protocol/tests/test_packet_creation.py index 03a6a8b..ff1dc27 100644 --- a/enocean/protocol/tests/test_packet_creation.py +++ b/enocean/protocol/tests/test_packet_creation.py @@ -1,6 +1,6 @@ # -*- encoding: utf-8 -*- from __future__ import print_function, unicode_literals, division, absolute_import -from nose.tools import raises +from pytest import raises from enocean.protocol.packet import Packet, RadioPacket from enocean.protocol.constants import PACKET, RORG @@ -242,15 +242,15 @@ def test_switch(): @timing(1000) -@raises(ValueError) def test_illegal_eep_enum1(): - RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79], EB='inexisting') + with raises(ValueError): + RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79], EB='inexisting') -@raises(ValueError) @timing(1000) def test_illegal_eep_enum2(): - RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79], EB=2) + with raises(ValueError): + RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79], EB=2) # Corresponds to the tests done in test_eep diff --git a/run_tests_with_timing.sh b/run_tests_with_timing.sh index 4cd310e..4d56c78 100755 --- a/run_tests_with_timing.sh +++ b/run_tests_with_timing.sh @@ -1,2 +1,2 @@ #!/bin/sh -WITH_TIMINGS=1 nosetests -s -q +pytest -s -q