commit
31bc2716fc
|
@ -15,7 +15,6 @@ jobs:
|
|||
os:
|
||||
- Ubuntu
|
||||
py:
|
||||
- "3.10"
|
||||
- "3.9"
|
||||
- "3.8"
|
||||
- "3.7"
|
||||
|
|
|
@ -6,13 +6,13 @@ class TabCompletePacket(Packet):
|
|||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x0F if context.protocol_later_eq(741) else \
|
||||
0x10 if context.protocol_later_eq(721) else \
|
||||
0x11 if context.protocol_later_eq(550) else \
|
||||
0x10 if context.protocol_later_eq(345) else \
|
||||
0x0E if context.protocol_later_eq(332) else \
|
||||
0x0F if context.protocol_later_eq(318) else \
|
||||
0x0E if context.protocol_later_eq(70) else \
|
||||
0x3A
|
||||
0x10 if context.protocol_later_eq(721) else \
|
||||
0x11 if context.protocol_later_eq(550) else \
|
||||
0x10 if context.protocol_later_eq(345) else \
|
||||
0x0E if context.protocol_later_eq(332) else \
|
||||
0x0F if context.protocol_later_eq(318) else \
|
||||
0x0E if context.protocol_later_eq(70) else \
|
||||
0x3A
|
||||
|
||||
packet_name = 'tab complete'
|
||||
|
||||
|
|
|
@ -6,14 +6,14 @@ class TabCompletePacket(Packet):
|
|||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x06 if context.protocol_later_eq(464) else \
|
||||
0x05 if context.protocol_later_eq(389) else \
|
||||
0x04 if context.protocol_later_eq(345) else \
|
||||
0x01 if context.protocol_later_eq(336) else \
|
||||
0x02 if context.protocol_later_eq(318) else \
|
||||
0x01 if context.protocol_later_eq(94) else \
|
||||
0x00 if context.protocol_later_eq(70) else \
|
||||
0x15 if context.protocol_later_eq(69) else \
|
||||
0x14
|
||||
0x05 if context.protocol_later_eq(389) else \
|
||||
0x04 if context.protocol_later_eq(345) else \
|
||||
0x01 if context.protocol_later_eq(336) else \
|
||||
0x02 if context.protocol_later_eq(318) else \
|
||||
0x01 if context.protocol_later_eq(94) else \
|
||||
0x00 if context.protocol_later_eq(70) else \
|
||||
0x15 if context.protocol_later_eq(69) else \
|
||||
0x14
|
||||
packet_name = 'tab complete'
|
||||
|
||||
@property
|
||||
|
|
|
@ -7,13 +7,12 @@ import unittest
|
|||
class BaseRaiseExceptionTest(unittest.TestCase):
|
||||
EXCEPTION_TO_TEST = Exception
|
||||
|
||||
<<<<<<< HEAD
|
||||
def test_raise_yggdrasil_error_message(self):
|
||||
with self.assertRaises(YggdrasilError) as cm:
|
||||
raise YggdrasilError("Error!")
|
||||
|
||||
self.assertEqual(str(cm.exception), "Error!")
|
||||
=======
|
||||
|
||||
def test_raise_error(self):
|
||||
with self.assertRaises(self.EXCEPTION_TO_TEST):
|
||||
raise self.EXCEPTION_TO_TEST
|
||||
|
@ -35,4 +34,3 @@ class RaiseDeserializationError(BaseRaiseExceptionTest):
|
|||
|
||||
class RaiseSerializationError(BaseRaiseExceptionTest):
|
||||
EXCEPTION_TO_TEST = SerializationError
|
||||
>>>>>>> 55ff270f167d36cd67c637332d7db9ad1b5c68ce
|
||||
|
|
Loading…
Reference in New Issue