mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Similar to 366701cfb2, which is valid on its own, but here we just apply it to all rules.
18 lines
474 B
Python
18 lines
474 B
Python
from galaxy import util
|
|
|
|
|
|
def test_strip_control_characters():
|
|
s = '\x00bla'
|
|
assert util.strip_control_characters(s) == 'bla'
|
|
|
|
|
|
def test_strip_control_characters_nested():
|
|
s = '\x00bla'
|
|
stripped_s = 'bla'
|
|
l = [s]
|
|
t = (s, 'blub')
|
|
d = {42: s}
|
|
assert util.strip_control_characters_nested(l)[0] == stripped_s
|
|
assert util.strip_control_characters_nested(t)[0] == stripped_s
|
|
assert util.strip_control_characters_nested(d)[42] == stripped_s
|