Fix the ToolParamSanitizer unit test. Since mercurial imports locale.getpreferredencoding(), which is part of the Python stdlib, the behavior of python strings is re-sorted, so we have to sort them back...

This commit is contained in:
Greg Von Kuster
2011-06-01 16:21:12 -04:00
parent 95ffc3243f
commit 7c5e57f774
+1 -1
View File
@@ -19,7 +19,7 @@ class ToolParameterSanitizer( object ):
... <valid initial="string.letters"/>
... </sanitizer>
... ''' ) )
>>> sanitizer.sanitize_param( string.printable ) == string.letters
>>> sanitizer.sanitize_param( ''.join( sorted( [ c for c in string.printable ] ) ) ) == ''.join( sorted( [ c for c in string.letters ] ) )
True
>>> slash = chr( 92 )
>>> sanitizer = ToolParameterSanitizer.from_element( XML(