Changeset 4520

Show
Ignore:
Timestamp:
04/20/09 18:42:12 (4 years ago)
Author:
getxsick
Message:

tests: add protocols to Packet's object with *disabled* strict.

Currently, this test is skipped, cause I have to find out if py.test handles
Python's warnings. If not, I will add stderr capture to finish it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branch/UMPA/tests/unit/test_packets.py

    r4518 r4520  
    2323from umpa.protocols import IP, TCP, UDP, Payload 
    2424from umpa.utils.exceptions import UMPAException, UMPAStrictException 
     25from umpa._packets import StrictWarning 
    2526 
    2627import py.test 
     
    5960        py.test.raises(UMPAStrictException, p.include, UDP(), TCP()) 
    6061 
     62    def test_add_new_protocols__warn(self): 
     63        # TODO: how py.test handles with warnings? 
     64        py.test.skip('how py.test handles with warnings?') 
     65        p = Packet(strict=False) 
     66        py.test.raises(StrictWarning, "p.include(TCP(), IP())")