Dirk Alders 3 years ago
parent
commit
76d8ae9b1b
6 changed files with 4620 additions and 4602 deletions
  1. 6
    3
      __init__.py
  2. 117
    108
      _testresults_/coverage.xml
  3. 4487
    4487
      _testresults_/unittest.json
  4. BIN
      _testresults_/unittest.pdf
  5. 5
    2
      csp.py
  6. 5
    2
      stp.py

+ 6
- 3
__init__.py View File

@@ -41,8 +41,11 @@ import sys
41 41
 if sys.version_info < (3, 0):
42 42
     from cStringIO import StringIO
43 43
 
44
-logger_name = 'STRINGTOOLS'
45
-logger = logging.getLogger(logger_name)
44
+try:
45
+    from config import APP_NAME as ROOT_LOGGER_NAME
46
+except ImportError:
47
+    ROOT_LOGGER_NAME = 'root'
48
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
46 49
 
47 50
 __DESCRIPTION__ = """The Module {\\tt %s} is designed to support functionality for strings (e.g. transfer strings via a bytestream, compressing, extracting, ...).
48 51
 For more Information read the sphinx documentation.""" % __name__.replace('_', '\_')
@@ -61,7 +64,7 @@ def physical_value_repr(value, unit=''):
61 64
     prefix = {
62 65
         -4: 'p',
63 66
         -3: 'n',
64
-        -2: 'µ',
67
+        -2: 'u',
65 68
         -1: 'm',
66 69
         0: '',
67 70
         1: 'k',

+ 117
- 108
_testresults_/coverage.xml View File

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" ?>
2
-<coverage branch-rate="0.9767" branches-covered="84" branches-valid="86" complexity="0" line-rate="1" lines-covered="208" lines-valid="208" timestamp="1580906930804" version="4.5">
2
+<coverage branch-rate="0.9767" branches-covered="84" branches-valid="86" complexity="0" line-rate="1" lines-covered="217" lines-valid="217" timestamp="1608508804998" version="4.5.2">
3 3
 	<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
4 4
 	<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
5 5
 	<sources/>
@@ -22,81 +22,84 @@
22 22
 						<line hits="1" number="42"/>
23 23
 						<line hits="1" number="44"/>
24 24
 						<line hits="1" number="45"/>
25
+						<line hits="1" number="46"/>
25 26
 						<line hits="1" number="47"/>
27
+						<line hits="1" number="48"/>
26 28
 						<line hits="1" number="50"/>
27 29
 						<line hits="1" number="53"/>
28
-						<line hits="1" number="60"/>
29
-						<line hits="1" number="61"/>
30
-						<line hits="1" number="73"/>
31
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="74"/>
32
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="75"/>
30
+						<line hits="1" number="56"/>
31
+						<line hits="1" number="63"/>
32
+						<line hits="1" number="64"/>
33 33
 						<line hits="1" number="76"/>
34
-						<line hits="1" number="77"/>
34
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="77"/>
35
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="78"/>
35 36
 						<line hits="1" number="79"/>
36 37
 						<line hits="1" number="80"/>
37
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="81"/>
38 38
 						<line hits="1" number="82"/>
39
-						<line hits="1" number="84"/>
40
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="86"/>
39
+						<line hits="1" number="83"/>
40
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="84"/>
41
+						<line hits="1" number="85"/>
41 42
 						<line hits="1" number="87"/>
42
-						<line hits="1" number="89"/>
43
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="90"/>
44
-						<line hits="1" number="91"/>
43
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="89"/>
44
+						<line hits="1" number="90"/>
45 45
 						<line hits="1" number="92"/>
46
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="93"/>
47
+						<line hits="1" number="94"/>
46 48
 						<line hits="1" number="95"/>
47
-						<line hits="1" number="96"/>
48
-						<line hits="1" number="97"/>
49
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="98"/>
49
+						<line hits="1" number="98"/>
50 50
 						<line hits="1" number="99"/>
51
-						<line hits="1" number="101"/>
52
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="102"/>
53
-						<line hits="1" number="103"/>
54
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="104"/>
55
-						<line hits="1" number="105"/>
51
+						<line hits="1" number="100"/>
52
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="101"/>
53
+						<line hits="1" number="102"/>
54
+						<line hits="1" number="104"/>
55
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="105"/>
56 56
 						<line hits="1" number="106"/>
57
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="107"/>
58
+						<line hits="1" number="108"/>
57 59
 						<line hits="1" number="109"/>
58
-						<line hits="1" number="110"/>
59
-						<line hits="1" number="111"/>
60
+						<line hits="1" number="112"/>
61
+						<line hits="1" number="113"/>
60 62
 						<line hits="1" number="114"/>
61
-						<line hits="1" number="131"/>
62
-						<line hits="1" number="132"/>
63
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="133"/>
63
+						<line hits="1" number="117"/>
64 64
 						<line hits="1" number="134"/>
65
-						<line hits="1" number="136"/>
65
+						<line hits="1" number="135"/>
66
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="136"/>
66 67
 						<line hits="1" number="137"/>
67
-						<line hits="1" number="138"/>
68 68
 						<line hits="1" number="139"/>
69
+						<line hits="1" number="140"/>
69 70
 						<line hits="1" number="141"/>
70 71
 						<line hits="1" number="142"/>
71
-						<line hits="1" number="143"/>
72
-						<line branch="true" condition-coverage="50% (1/2)" hits="1" missing-branches="146" number="144"/>
72
+						<line hits="1" number="144"/>
73 73
 						<line hits="1" number="145"/>
74 74
 						<line hits="1" number="146"/>
75
+						<line branch="true" condition-coverage="50% (1/2)" hits="1" missing-branches="149" number="147"/>
76
+						<line hits="1" number="148"/>
75 77
 						<line hits="1" number="149"/>
76
-						<line hits="1" number="165"/>
77
-						<line hits="1" number="166"/>
78
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="167"/>
78
+						<line hits="1" number="152"/>
79 79
 						<line hits="1" number="168"/>
80
-						<line hits="1" number="170"/>
80
+						<line hits="1" number="169"/>
81
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="170"/>
81 82
 						<line hits="1" number="171"/>
82
-						<line hits="1" number="172"/>
83 83
 						<line hits="1" number="173"/>
84
+						<line hits="1" number="174"/>
84 85
 						<line hits="1" number="175"/>
85 86
 						<line hits="1" number="176"/>
86
-						<line branch="true" condition-coverage="50% (1/2)" hits="1" missing-branches="179" number="177"/>
87 87
 						<line hits="1" number="178"/>
88 88
 						<line hits="1" number="179"/>
89
+						<line branch="true" condition-coverage="50% (1/2)" hits="1" missing-branches="182" number="180"/>
90
+						<line hits="1" number="181"/>
89 91
 						<line hits="1" number="182"/>
90
-						<line hits="1" number="197"/>
91
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="198"/>
92
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="199"/>
92
+						<line hits="1" number="185"/>
93 93
 						<line hits="1" number="200"/>
94
-						<line hits="1" number="202"/>
94
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="201"/>
95
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="202"/>
95 96
 						<line hits="1" number="203"/>
97
+						<line hits="1" number="205"/>
96 98
 						<line hits="1" number="206"/>
97
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="213"/>
98
-						<line hits="1" number="214"/>
99
-						<line hits="1" number="216"/>
99
+						<line hits="1" number="209"/>
100
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="216"/>
101
+						<line hits="1" number="217"/>
102
+						<line hits="1" number="219"/>
100 103
 					</lines>
101 104
 				</class>
102 105
 				<class branch-rate="1" complexity="0" filename="/user_data/data/dirk/prj/unittest/stringtools/pylibs/stringtools/csp.py" line-rate="1" name="csp.py">
@@ -108,27 +111,30 @@
108 111
 						<line hits="1" number="25"/>
109 112
 						<line hits="1" number="27"/>
110 113
 						<line hits="1" number="28"/>
114
+						<line hits="1" number="29"/>
111 115
 						<line hits="1" number="30"/>
116
+						<line hits="1" number="31"/>
112 117
 						<line hits="1" number="33"/>
113
-						<line hits="1" number="44"/>
114
-						<line hits="1" number="46"/>
118
+						<line hits="1" number="36"/>
115 119
 						<line hits="1" number="47"/>
116
-						<line hits="1" number="48"/>
120
+						<line hits="1" number="49"/>
117 121
 						<line hits="1" number="50"/>
118
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="58"/>
119
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="59"/>
120
-						<line hits="1" number="60"/>
121
-						<line hits="1" number="62"/>
122
+						<line hits="1" number="51"/>
123
+						<line hits="1" number="53"/>
124
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="61"/>
125
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="62"/>
122 126
 						<line hits="1" number="63"/>
123
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="64"/>
124 127
 						<line hits="1" number="65"/>
125
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="66"/>
126
-						<line hits="1" number="67"/>
128
+						<line hits="1" number="66"/>
129
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="67"/>
127 130
 						<line hits="1" number="68"/>
131
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="69"/>
132
+						<line hits="1" number="70"/>
128 133
 						<line hits="1" number="71"/>
129
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="86"/>
130
-						<line hits="1" number="87"/>
131
-						<line hits="1" number="89"/>
134
+						<line hits="1" number="74"/>
135
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="89"/>
136
+						<line hits="1" number="90"/>
137
+						<line hits="1" number="92"/>
132 138
 					</lines>
133 139
 				</class>
134 140
 				<class branch-rate="1" complexity="0" filename="/user_data/data/dirk/prj/unittest/stringtools/pylibs/stringtools/stp.py" line-rate="1" name="stp.py">
@@ -140,93 +146,96 @@
140 146
 						<line hits="1" number="25"/>
141 147
 						<line hits="1" number="27"/>
142 148
 						<line hits="1" number="28"/>
149
+						<line hits="1" number="29"/>
143 150
 						<line hits="1" number="30"/>
144
-						<line hits="1" number="32"/>
145
-						<line hits="1" number="34"/>
146
-						<line hits="1" number="36"/>
151
+						<line hits="1" number="31"/>
152
+						<line hits="1" number="33"/>
153
+						<line hits="1" number="35"/>
154
+						<line hits="1" number="37"/>
147 155
 						<line hits="1" number="39"/>
148
-						<line hits="1" number="41"/>
149
-						<line hits="1" number="43"/>
150
-						<line hits="1" number="45"/>
151
-						<line hits="1" number="49"/>
152
-						<line hits="1" number="60"/>
153
-						<line hits="1" number="62"/>
156
+						<line hits="1" number="42"/>
157
+						<line hits="1" number="44"/>
158
+						<line hits="1" number="46"/>
159
+						<line hits="1" number="48"/>
160
+						<line hits="1" number="52"/>
154 161
 						<line hits="1" number="63"/>
155
-						<line hits="1" number="64"/>
156 162
 						<line hits="1" number="65"/>
163
+						<line hits="1" number="66"/>
157 164
 						<line hits="1" number="67"/>
158
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="68"/>
159
-						<line hits="1" number="69"/>
165
+						<line hits="1" number="68"/>
160 166
 						<line hits="1" number="70"/>
167
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="71"/>
161 168
 						<line hits="1" number="72"/>
162
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="80"/>
163
-						<line hits="1" number="81"/>
164
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="82"/>
169
+						<line hits="1" number="73"/>
170
+						<line hits="1" number="75"/>
165 171
 						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="83"/>
166 172
 						<line hits="1" number="84"/>
167
-						<line hits="1" number="86"/>
168
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="88"/>
169
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="89"/>
170
-						<line hits="1" number="90"/>
171
-						<line hits="1" number="92"/>
173
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="85"/>
174
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="86"/>
175
+						<line hits="1" number="87"/>
176
+						<line hits="1" number="89"/>
177
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="91"/>
178
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="92"/>
172 179
 						<line hits="1" number="93"/>
173
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="95"/>
174
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="96"/>
175
-						<line hits="1" number="97"/>
176
-						<line hits="1" number="98"/>
180
+						<line hits="1" number="95"/>
181
+						<line hits="1" number="96"/>
182
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="98"/>
183
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="99"/>
177 184
 						<line hits="1" number="100"/>
178
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="101"/>
179
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="102"/>
185
+						<line hits="1" number="101"/>
180 186
 						<line hits="1" number="103"/>
181
-						<line hits="1" number="104"/>
182
-						<line hits="1" number="105"/>
183
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="106"/>
187
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="104"/>
188
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="105"/>
189
+						<line hits="1" number="106"/>
184 190
 						<line hits="1" number="107"/>
185 191
 						<line hits="1" number="108"/>
192
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="109"/>
186 193
 						<line hits="1" number="110"/>
187
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="111"/>
188
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="112"/>
194
+						<line hits="1" number="111"/>
189 195
 						<line hits="1" number="113"/>
190
-						<line hits="1" number="114"/>
196
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="114"/>
197
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="115"/>
191 198
 						<line hits="1" number="116"/>
192
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="117"/>
193
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="118"/>
199
+						<line hits="1" number="117"/>
194 200
 						<line hits="1" number="119"/>
195
-						<line hits="1" number="120"/>
196
-						<line hits="1" number="121"/>
197
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="122"/>
201
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="120"/>
202
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="121"/>
203
+						<line hits="1" number="122"/>
198 204
 						<line hits="1" number="123"/>
199 205
 						<line hits="1" number="124"/>
200
-						<line hits="1" number="125"/>
206
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="125"/>
201 207
 						<line hits="1" number="126"/>
202
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="127"/>
208
+						<line hits="1" number="127"/>
203 209
 						<line hits="1" number="128"/>
204 210
 						<line hits="1" number="129"/>
205
-						<line hits="1" number="130"/>
206
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="131"/>
211
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="130"/>
212
+						<line hits="1" number="131"/>
207 213
 						<line hits="1" number="132"/>
208 214
 						<line hits="1" number="133"/>
209
-						<line hits="1" number="134"/>
215
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="134"/>
216
+						<line hits="1" number="135"/>
210 217
 						<line hits="1" number="136"/>
211 218
 						<line hits="1" number="137"/>
212
-						<line hits="1" number="138"/>
219
+						<line hits="1" number="139"/>
213 220
 						<line hits="1" number="140"/>
214 221
 						<line hits="1" number="141"/>
215
-						<line hits="1" number="142"/>
216 222
 						<line hits="1" number="143"/>
217
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="144"/>
223
+						<line hits="1" number="144"/>
218 224
 						<line hits="1" number="145"/>
219 225
 						<line hits="1" number="146"/>
226
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="147"/>
227
+						<line hits="1" number="148"/>
220 228
 						<line hits="1" number="149"/>
221
-						<line hits="1" number="164"/>
222
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="166"/>
223
-						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="167"/>
224
-						<line hits="1" number="168"/>
229
+						<line hits="1" number="152"/>
230
+						<line hits="1" number="167"/>
225 231
 						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="169"/>
226
-						<line hits="1" number="170"/>
227
-						<line hits="1" number="172"/>
228
-						<line hits="1" number="174"/>
232
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="170"/>
233
+						<line hits="1" number="171"/>
234
+						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="172"/>
235
+						<line hits="1" number="173"/>
229 236
 						<line hits="1" number="175"/>
237
+						<line hits="1" number="177"/>
238
+						<line hits="1" number="178"/>
230 239
 					</lines>
231 240
 				</class>
232 241
 			</classes>

+ 4487
- 4487
_testresults_/unittest.json
File diff suppressed because it is too large
View File


BIN
_testresults_/unittest.pdf View File


+ 5
- 2
csp.py View File

@@ -24,8 +24,11 @@ import stringtools
24 24
 import logging
25 25
 import sys
26 26
 
27
-logger_name = 'STRINGTOOLS'
28
-logger = logging.getLogger(logger_name)
27
+try:
28
+    from config import APP_NAME as ROOT_LOGGER_NAME
29
+except ImportError:
30
+    ROOT_LOGGER_NAME = 'root'
31
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
29 32
 
30 33
 DATA_SEPERATOR = b'\n'
31 34
 

+ 5
- 2
stp.py View File

@@ -24,8 +24,11 @@ import stringtools
24 24
 import logging
25 25
 import sys
26 26
 
27
-logger_name = 'STRINGTOOLS'
28
-logger = logging.getLogger(logger_name)
27
+try:
28
+    from config import APP_NAME as ROOT_LOGGER_NAME
29
+except ImportError:
30
+    ROOT_LOGGER_NAME = 'root'
31
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
29 32
 
30 33
 DATA_SYNC = b'\x3a'
31 34
 """The data sync byte"""

Loading…
Cancel
Save