Skip to content

Commit

Permalink
add a basic unit test for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
obormot committed May 28, 2021
1 parent 032c118 commit f5d21cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dpkt/ethernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,3 +855,11 @@ def test_eth_novell():
assert isinstance(eth.data, dpkt.ipx.IPX)
assert eth.data.tc == 2
assert eth.data.data == b''


def test_eth_pprint():
d = (b'\x00\x00\x01\x00\x00\x00\xfe\xff\x20\x00\x01\x00\x08\x00\x45\x00\x00\x28\x00\x00\x40'
b'\x00\x2f\x06\xf2\x34\x41\xd0\xe4\xdf\x91\xfe\xa0\xed\x00\x50\x0d\x2c\x11\x4c\xa9\x49'
b'\x38\xaf\xff\xf4\x50\x10\x19\x20\x3c\x63\x00\x00')
eth = Ethernet(d)
eth.pprint() # exercise .pprint() for the coverage tests

0 comments on commit f5d21cf

Please sign in to comment.