Ejemplo n.º 1
0
 def testVarInt(self):
     value = 5533
     buff = Buffer()
     buff.buff = buff.pack_varint(value)
     self.assertTrue(buff.unpack_varint() == value)
Ejemplo n.º 2
0
    def testString(self):
        text = "more tests, and stuff"

        buff = Buffer()
        buff.buff = buff.pack_string(text)
        self.assertTrue(text == buff.unpack_string())
Ejemplo n.º 3
0
 def testUuid(self):
     uuid = types.UUID.from_offline_player("KLonter")
     buff = Buffer()
     buff.buff = buff.pack_uuid(uuid)
     self.assertTrue(uuid == buff.unpack_uuid())
Ejemplo n.º 4
0
 def testBlockPosition(self):
     blockpos = (345, -100, -2005)
     buff = Buffer()
     buff.buff = buff.pack_blockposition(blockpos)
     self.assertTrue(blockpos == buff.unpack_blockposition())
Ejemplo n.º 5
0
 def testChat(self):
     text = "Hi there !"
     buff = Buffer()
     buff.buff = buff.pack_chat(text)
     self.assertTrue(text == buff.unpack_chat())
Ejemplo n.º 6
0
Archivo: tests.py Proyecto: aaps/quarry
 def testVarInt(self):
     value = 5533
     buff = Buffer()
     buff.buff = buff.pack_varint(value)
     self.assertTrue(buff.unpack_varint() == value)
Ejemplo n.º 7
0
Archivo: tests.py Proyecto: aaps/quarry
 def testUuid(self):
     uuid = types.UUID.from_offline_player("KLonter")
     buff = Buffer()
     buff.buff = buff.pack_uuid(uuid)
     self.assertTrue(uuid == buff.unpack_uuid())
Ejemplo n.º 8
0
Archivo: tests.py Proyecto: aaps/quarry
    def testString(self):
        text = "more tests, and stuff"

        buff = Buffer()
        buff.buff = buff.pack_string(text)
        self.assertTrue(text == buff.unpack_string())
Ejemplo n.º 9
0
Archivo: tests.py Proyecto: aaps/quarry
 def testChat(self):
     text = "Hi there !"
     buff = Buffer()
     buff.buff = buff.pack_chat(text)
     self.assertTrue(text == buff.unpack_chat())
Ejemplo n.º 10
0
Archivo: tests.py Proyecto: aaps/quarry
 def testBlockPosition(self):
     blockpos = (345, -100, -2005)
     buff = Buffer()
     buff.buff = buff.pack_blockposition(blockpos)
     self.assertTrue(blockpos == buff.unpack_blockposition())