Skip to content

Commit

Permalink
Merge pull request #677 from NetSys/fix_test_util
Browse files Browse the repository at this point in the history
Fix bugs on Raising Assertion Error on Test Module
  • Loading branch information
sangjinhan authored Oct 13, 2017
2 parents 16295a4 + 0e2835e commit db6a3e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bessctl/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ class BessModuleTestCase(unittest.TestCase):
@staticmethod
def assertSamePackets(pkt1, pkt2):
if pkt_str(pkt1) != pkt_str(pkt2):
raise AssertionError('"%s" != "%s"',
pkt_str(pkt1), pkt_str(pkt2))
raise AssertionError(
'"%s" != "%s"' % (pkt_str(pkt1), pkt_str(pkt2)))

@staticmethod
def assertNotSamePackets(pkt1, pkt2):
if pkt_str(pkt1) == pkt_str(pkt2):
raise AssertionError('"%s" == "%s"',
pkt_str(pkt1), pkt_str(pkt2))
raise AssertionError(
'"%s" == "%s"' % (pkt_str(pkt1), pkt_str(pkt2)))

def assertBessAlive(self):
try:
Expand Down

0 comments on commit db6a3e9

Please sign in to comment.