Esempio n. 1
0
 def testVarInt(self):
     value = 5533
     buff = Buffer()
     buff.buff = buff.pack_varint(value)
     self.assertTrue(buff.unpack_varint() == value)
Esempio 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())
Esempio 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())
Esempio n. 4
0
 def testBlockPosition(self):
     blockpos = (345, -100, -2005)
     buff = Buffer()
     buff.buff = buff.pack_blockposition(blockpos)
     self.assertTrue(blockpos == buff.unpack_blockposition())
Esempio n. 5
0
 def testChat(self):
     text = "Hi there !"
     buff = Buffer()
     buff.buff = buff.pack_chat(text)
     self.assertTrue(text == buff.unpack_chat())
Esempio n. 6
0
File: tests.py Progetto: aaps/quarry
 def testVarInt(self):
     value = 5533
     buff = Buffer()
     buff.buff = buff.pack_varint(value)
     self.assertTrue(buff.unpack_varint() == value)
Esempio n. 7
0
File: tests.py Progetto: 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())
Esempio n. 8
0
File: tests.py Progetto: aaps/quarry
    def testString(self):
        text = "more tests, and stuff"

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