示例#1
0
 def check_many_dots(self):
     path = "..a.....b.c...d."
     assert _escape_pathname(path) == "a.b.c.d"
示例#2
0
 def check_negative(self):
     # it's better if negative numbers are preserved
     path = "x= -2, y=-50"
     assert _escape_pathname(path) == "x=-2.y=-50"
示例#3
0
 def check_illegal_path(self):
     path = "\\/.a=2,   b=x/y/z"
     assert _escape_pathname(path) == "a=2.b=x.y.z"
示例#4
0
 def check_many_dots(self):
     path = "..a.....b.c...d."
     assert _escape_pathname(path) == "a.b.c.d"
示例#5
0
 def check_negative(self):
     # it's better if negative numbers are preserved
     path = "x= -2, y=-50"
     assert _escape_pathname(path) == "x=-2.y=-50"
示例#6
0
 def check_illegal_path(self):
     path = "\\/.a=2,   b=x/y/z"
     assert _escape_pathname(path) == "a=2.b=x.y.z"