@@ -14,9 +14,18 @@ def canonizeStringList (stringList):
1414def run (autoTester ):
1515 autoTester .check ('min' , min (- 1.1 , - 1 , - 3 ))
1616 autoTester .check ('max' , max (- 1.1 , - 1 , - 3 ))
17+ autoTester .check ('max' , max ([- 1.1 , - 1 , - 3 ]))
18+ autoTester .check ('max' , max ((- 1.1 , - 1 , - 3 )))
19+ autoTester .check ('max' , max ('abc' , 'ABC' , 'xyz' , 'XYZ' ))
20+ autoTester .check ('max' , max ('abc' , 'ABC' , 'xyz' , 'XYZ' , key = lambda v : v [1 ]))
21+ autoTester .check ('max' , max (['abc' , 'ABC' , 'xyz' , 'XYZ' ]))
22+ autoTester .check ('max' , autoTester .expectException (lambda : max ([])))
23+ autoTester .check ('max' , max ([], default = 'zzz' ))
1724 autoTester .check ('abs' , abs (- 1 ), abs (1 ), abs (0 ), abs (- 0.1 ), abs (0.1 ))
25+
1826 autoTester .check ('ord' , ord ('a' ), ord ('e´' [0 ])) # This is the 2 codepoint version
19-
27+ autoTester .check ('chr' , chr (97 ), chr (122 ), chr (65 ), chr (90 )) # a z A Z
28+
2029 autoTester .check ('round' ,
2130 round (4.006 ),
2231 round (4.006 , 2 ),
@@ -104,21 +113,23 @@ def run (autoTester):
104113 '<br>'
105114 )
106115
107- autoTester .check ("" .isalpha ())
108- autoTester .check ("123" .isalpha ())
109- autoTester .check ("abc" .isalpha ())
110- autoTester .check ("abc123" .isalpha ())
116+ autoTester .check ("isalpha" ,
117+ "" .isalpha (),
118+ "123" .isalpha (),
119+ "abc" .isalpha (),
120+ "abc123" .isalpha (),
121+ )
111122
112123 enumerate_list = ['a' , 'b' , 'c' , 'd' , 'e' ]
113124 # JS does not have tuples so coerce to list of lists
114- autoTester .check (
125+ autoTester .check ("enumerate" ,
115126 [list (item ) for item in enumerate (enumerate_list )],
116127 [list (item ) for item in enumerate (enumerate_list , 1 )],
117128 [list (item ) for item in enumerate (enumerate_list , start = 2 )]
118129 )
119130
120131 replace_test = "abcabcabcabc"
121- autoTester .check (
132+ autoTester .check ("replace" ,
122133 replace_test .replace ("c" , "x" ),
123134 replace_test .replace ("c" , "x" , - 1 ),
124135 replace_test .replace ("c" , "x" , 0 ),
@@ -127,7 +138,7 @@ def run (autoTester):
127138 replace_test .replace ("c" , "x" , 10 ),
128139 )
129140
130- autoTester .check (
141+ autoTester .check ("bin-oct-hex" ,
131142 bin (42 ),
132143 oct (42 ),
133144 hex (42 ),
@@ -140,7 +151,8 @@ def run (autoTester):
140151 )
141152
142153 string_test = "abcdefghijkl"
143- autoTester .check (string_test .startswith ("" ),
154+ autoTester .check ("startswith" ,
155+ string_test .startswith ("" ),
144156 string_test .startswith ("abcd" ),
145157 string_test .startswith ("efgh" ),
146158 string_test .startswith ("efgh" , 2 ),
@@ -157,7 +169,7 @@ def run (autoTester):
157169 string_test .startswith (("abc" , "defgh" ), 3 , 6 ),
158170 )
159171
160- autoTester .check (
172+ autoTester .check ("endswith" ,
161173 string_test .endswith ("" ),
162174 string_test .endswith ("ijkl" ),
163175 string_test .endswith ("efgh" ),
0 commit comments