5
5
nativestr ,
6
6
parse_to_list ,
7
7
quote_string ,
8
- random_string ,
9
- parse_to_dict
8
+ random_string
10
9
)
11
10
12
11
@@ -20,34 +19,11 @@ def test_list_or_args():
20
19
21
20
22
21
def test_parse_to_list ():
23
- assert parse_to_list (None ) == []
24
22
r = ["hello" , b"my name" , "45" , "555.55" , "is simon!" , None ]
25
23
assert parse_to_list (r ) == \
26
24
["hello" , "my name" , 45 , 555.55 , "is simon!" , None ]
27
25
28
26
29
- def test_parse_to_dict ():
30
- assert parse_to_dict (None ) == {}
31
- r = [['Some number' , '1.0345' ],
32
- ['Some string' , 'hello' ],
33
- ['Child iterators' ,
34
- ['Time' , '0.2089' , 'Counter' , 3 , 'Child iterators' ,
35
- ['Type' , 'bar' , 'Time' , '0.0729' , 'Counter' , 3 ],
36
- ['Type' , 'barbar' , 'Time' , '0.058' , 'Counter' , 3 ]]]]
37
- assert parse_to_dict (r ) == {
38
- 'Child iterators' : {
39
- 'Child iterators' : [
40
- {'Counter' : 3.0 , 'Time' : 0.0729 , 'Type' : 'bar' },
41
- {'Counter' : 3.0 , 'Time' : 0.058 , 'Type' : 'barbar' }
42
- ],
43
- 'Counter' : 3.0 ,
44
- 'Time' : 0.2089
45
- },
46
- 'Some number' : 1.0345 ,
47
- 'Some string' : 'hello'
48
- }
49
-
50
-
51
27
def test_nativestr ():
52
28
assert nativestr ('teststr' ) == 'teststr'
53
29
assert nativestr (b'teststr' ) == 'teststr'
0 commit comments