示例#1
0
def test_strip_non_printable_regular():
    assert strip_non_printable('hello there') == 'hello there'
示例#2
0
def test_strip_non_printable_contains_binary():
    assert strip_non_printable(ub(chr(20)) + 'my thingo' +
                               ub(chr(155))) == ('my thingo (contains binary)')
示例#3
0
def test_strip_non_printable_only_binary():
    assert strip_non_printable(ub(chr(20)) +
                               ub(chr(155))) == ('(contains binary)')
示例#4
0
def test_strip_non_printable_regular():
    assert strip_non_printable("hello there") == "hello there"
示例#5
0
 def __repr__(self):
     printable_value = strip_non_printable(self.value)
     return (
         "<{0} value={1} (oid={2}, oid_index={3}, snmp_type={4})>".format(
             self.__class__.__name__, urepr(printable_value),
             urepr(self.oid), urepr(self.oid_index), urepr(self.snmp_type)))
示例#6
0
def test_strip_non_printable_regular():
    assert strip_non_printable('hello there') == 'hello there'
示例#7
0
def test_strip_non_printable_only_binary():
    assert strip_non_printable(ub(chr(20)) + ub(chr(155))) == (
        '(contains binary)'
    )
示例#8
0
def test_strip_non_printable_contains_binary():
    assert strip_non_printable(ub(chr(20)) + 'my thingo' + ub(chr(155))) == (
        'my thingo (contains binary)'
    )