test_parse code style tweaks
This commit is contained in:
parent
92b22bd5bc
commit
3caa412696
|
|
@ -52,12 +52,18 @@ class ParseTestCase(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
parse("A>B:>")
|
parse("A>B:>")
|
||||||
except:
|
except:
|
||||||
self.fail("empty status packed shouldn't raise exception")
|
self.fail("empty status packet shouldn't raise exception")
|
||||||
|
|
||||||
def test_unsupported_formats_raising(self):
|
def test_unsupported_formats_raising(self):
|
||||||
with self.assertRaises(UnknownFormat):
|
with self.assertRaises(UnknownFormat):
|
||||||
for packet_type in '#$%)*,<?T[_{}':
|
for packet_type in '#$%)*,<?T[_{}':
|
||||||
parse("A>B:%saaa" % packet_type)
|
packet = "A>B:%saaa" % packet_type
|
||||||
|
|
||||||
|
try:
|
||||||
|
parse(packet)
|
||||||
|
except UnknownFormat as exp:
|
||||||
|
self.assertEqual(exp.packet, packet)
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
class ParseBranchesTestCase(unittest.TestCase):
|
class ParseBranchesTestCase(unittest.TestCase):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue