def test_split(self): statstr = b'U F U C(192.85.72.197) I 4 24 80 16 22 0x0 0.082' s = Status(statstr) eq_(s.as_string, statstr.decode('ascii')) eq_(s.keyboard, b'U')
def test_str_magic(self): statstr = b'U F U C(192.85.72.197) I 4 24 80 16 22 0x0 0.082' s = Status(statstr) eq_(str(s), 'STATUS: ' + statstr.decode('ascii'))
def test_empty(self): s = Status(None) eq_(s.as_string, '') eq_(s.keyboard, None)
def test_empty(self): s = Status(None) assert s.as_string == "" assert s.keyboard == None
def test_str_magic(self): statstr = b"U F U C(192.85.72.197) I 4 24 80 16 22 0x0 0.082" s = Status(statstr) assert str(s) == "STATUS: " + statstr.decode("ascii")
def test_split(self): statstr = b"U F U C(192.85.72.197) I 4 24 80 16 22 0x0 0.082" s = Status(statstr) assert s.as_string == statstr.decode("ascii") assert s.keyboard == b"U"
def test_split(self): statstr = 'U F U C(192.85.72.197) I 4 24 80 16 22 0x0 0.082' s = Status(statstr) eq_(s.as_string, statstr) eq_(s.keyboard, 'U')