44 delist ,
55 list_or_args ,
66 nativestr ,
7- parse_to_dict ,
87 parse_to_list ,
98 quote_string ,
109 random_string ,
@@ -26,40 +25,6 @@ def test_parse_to_list():
2625 assert parse_to_list (r ) == ["hello" , "my name" , 45 , 555.55 , "is simon!" , None ]
2726
2827
29- def test_parse_to_dict ():
30- assert parse_to_dict (None ) == {}
31- r = [
32- ["Some number" , "1.0345" ],
33- ["Some string" , "hello" ],
34- [
35- "Child iterators" ,
36- [
37- "Time" ,
38- "0.2089" ,
39- "Counter" ,
40- 3 ,
41- "Child iterators" ,
42- ["Type" , "bar" , "Time" , "0.0729" , "Counter" , 3 ],
43- ["Type" , "barbar" , "Time" , "0.058" , "Counter" , 3 ],
44- ["Type" , "barbarbar" , "Time" , "0.0234" , "Counter" , 3 ],
45- ],
46- ],
47- ]
48- assert parse_to_dict (r ) == {
49- "Child iterators" : {
50- "Child iterators" : [
51- {"Counter" : 3.0 , "Time" : 0.0729 , "Type" : "bar" },
52- {"Counter" : 3.0 , "Time" : 0.058 , "Type" : "barbar" },
53- {"Counter" : 3.0 , "Time" : 0.0234 , "Type" : "barbarbar" },
54- ],
55- "Counter" : 3.0 ,
56- "Time" : 0.2089 ,
57- },
58- "Some number" : 1.0345 ,
59- "Some string" : "hello" ,
60- }
61-
62-
6328def test_nativestr ():
6429 assert nativestr ("teststr" ) == "teststr"
6530 assert nativestr (b"teststr" ) == "teststr"
0 commit comments