Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions enocean/protocol/tests/test_packet_creation.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion run_tests_with_timing.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
WITH_TIMINGS=1 nosetests -s -q
pytest -s -q