Ejemplo n.º 1
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.º 2
0
def test_unpack_string():
    buffer = Buffer()
    buffer.add(b"\x04spam")
    assert buffer.unpack_string() == "spam"
Ejemplo n.º 3
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())