encommon 0.13.1__py3-none-any.whl → 0.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- encommon/__init__.py +2 -7
- encommon/colors/__init__.py +14 -0
- encommon/colors/color.py +518 -0
- encommon/colors/test/__init__.py +6 -0
- encommon/colors/test/test_color.py +189 -0
- encommon/config/config.py +83 -30
- encommon/config/files.py +16 -13
- encommon/config/logger.py +10 -5
- encommon/config/params.py +47 -31
- encommon/config/paths.py +15 -12
- encommon/config/test/__init__.py +1 -1
- encommon/config/test/test_config.py +15 -17
- encommon/config/test/test_files.py +8 -7
- encommon/config/test/test_logger.py +21 -15
- encommon/config/test/test_paths.py +12 -11
- encommon/config/utils.py +9 -3
- encommon/conftest.py +33 -22
- encommon/crypts/params.py +46 -11
- encommon/crypts/test/test_crypts.py +5 -5
- encommon/crypts/test/test_hashes.py +2 -1
- encommon/times/__init__.py +5 -3
- encommon/times/common.py +4 -3
- encommon/times/params.py +103 -45
- encommon/times/parse.py +39 -12
- encommon/times/test/test_duration.py +3 -2
- encommon/times/test/test_parse.py +16 -9
- encommon/times/test/test_time.py +123 -0
- encommon/times/test/test_timer.py +5 -4
- encommon/times/test/test_timers.py +10 -9
- encommon/times/test/test_unitime.py +23 -0
- encommon/times/test/test_window.py +4 -3
- encommon/times/test/test_windows.py +7 -6
- encommon/times/{times.py → time.py} +129 -22
- encommon/times/timer.py +10 -10
- encommon/times/timers.py +3 -3
- encommon/times/unitime.py +57 -0
- encommon/times/window.py +31 -31
- encommon/times/windows.py +10 -10
- encommon/types/__init__.py +20 -2
- encommon/types/classes.py +84 -0
- encommon/types/lists.py +33 -0
- encommon/types/notate.py +2 -1
- encommon/types/strings.py +34 -4
- encommon/types/test/test_classes.py +74 -0
- encommon/types/test/test_empty.py +2 -1
- encommon/types/test/test_lists.py +23 -0
- encommon/types/test/test_strings.py +15 -3
- encommon/types/types.py +20 -0
- encommon/utils/__init__.py +4 -0
- encommon/utils/paths.py +5 -6
- encommon/utils/sample.py +118 -41
- encommon/utils/stdout.py +53 -7
- encommon/utils/test/test_paths.py +3 -3
- encommon/utils/test/test_sample.py +128 -29
- encommon/utils/test/test_stdout.py +92 -28
- encommon/version.txt +1 -1
- {encommon-0.13.1.dist-info → encommon-0.15.0.dist-info}/METADATA +1 -1
- encommon-0.15.0.dist-info/RECORD +84 -0
- {encommon-0.13.1.dist-info → encommon-0.15.0.dist-info}/WHEEL +1 -1
- encommon/times/test/test_times.py +0 -89
- encommon-0.13.1.dist-info/RECORD +0 -73
- {encommon-0.13.1.dist-info → encommon-0.15.0.dist-info}/LICENSE +0 -0
- {encommon-0.13.1.dist-info → encommon-0.15.0.dist-info}/top_level.txt +0 -0
@@ -9,13 +9,15 @@ is permitted, for more information consult the project license file.
|
|
9
9
|
|
10
10
|
from _pytest.capture import CaptureFixture
|
11
11
|
|
12
|
+
from ..stdout import ArrayColors
|
12
13
|
from ..stdout import array_ansi
|
13
14
|
from ..stdout import kvpair_ansi
|
14
15
|
from ..stdout import make_ansi
|
15
16
|
from ..stdout import print_ansi
|
16
17
|
from ..stdout import strip_ansi
|
18
|
+
from ...config import LoggerParams
|
17
19
|
from ...times import Duration
|
18
|
-
from ...times import
|
20
|
+
from ...times import Time
|
19
21
|
from ...times.common import UNIXMPOCH
|
20
22
|
from ...types import Empty
|
21
23
|
|
@@ -96,31 +98,6 @@ def test_array_ansi() -> None: # noqa: CFQ001
|
|
96
98
|
'list': [1, 2],
|
97
99
|
'bool': False}
|
98
100
|
|
99
|
-
repeat = {
|
100
|
-
'dict': simple | {
|
101
|
-
'dict': simple}}
|
102
|
-
|
103
|
-
source = {
|
104
|
-
'str': 'value',
|
105
|
-
'int': 1,
|
106
|
-
'float': 1.0,
|
107
|
-
'complex': complex(3, 1),
|
108
|
-
'list': [simple],
|
109
|
-
'tuple': (simple,),
|
110
|
-
'range': range(1, 3),
|
111
|
-
'dict1': simple,
|
112
|
-
'dict2': simple,
|
113
|
-
'dict3': simple,
|
114
|
-
'set': {1, 2, 3},
|
115
|
-
'frozenset': {1, 2, 3},
|
116
|
-
'bool': True,
|
117
|
-
'none': None,
|
118
|
-
'_private': None,
|
119
|
-
'repeat': repeat,
|
120
|
-
'Empty': Empty,
|
121
|
-
'Duration': Duration(190802),
|
122
|
-
'Times': Times(0)}
|
123
|
-
|
124
101
|
|
125
102
|
output = strip_ansi(
|
126
103
|
array_ansi(simple))
|
@@ -163,6 +140,40 @@ def test_array_ansi() -> None: # noqa: CFQ001
|
|
163
140
|
'- 3')
|
164
141
|
|
165
142
|
|
143
|
+
colors = ArrayColors()
|
144
|
+
|
145
|
+
params = LoggerParams()
|
146
|
+
|
147
|
+
repeat = {
|
148
|
+
'dict': simple | {
|
149
|
+
'dict': simple}}
|
150
|
+
|
151
|
+
durate = Duration(190802)
|
152
|
+
|
153
|
+
source = {
|
154
|
+
'str': 'value',
|
155
|
+
'int': 1,
|
156
|
+
'float': 1.0,
|
157
|
+
'complex': complex(3, 1),
|
158
|
+
'list': [simple],
|
159
|
+
'tuple': (simple,),
|
160
|
+
'range': range(1, 3),
|
161
|
+
'dict1': simple,
|
162
|
+
'dict2': simple,
|
163
|
+
'dict3': simple,
|
164
|
+
'set': {1, 2, 3},
|
165
|
+
'frozenset': {1, 2, 3},
|
166
|
+
'bool': True,
|
167
|
+
'none': None,
|
168
|
+
'_private': None,
|
169
|
+
'repeat': repeat,
|
170
|
+
'colors': colors,
|
171
|
+
'params': params,
|
172
|
+
'Empty': Empty,
|
173
|
+
'Time': Time(0),
|
174
|
+
'Duration': durate}
|
175
|
+
|
176
|
+
|
166
177
|
output = strip_ansi(
|
167
178
|
array_ansi(source))
|
168
179
|
|
@@ -226,6 +237,59 @@ def test_array_ansi() -> None: # noqa: CFQ001
|
|
226
237
|
" str: 'value'\n"
|
227
238
|
' list: REPEAT\n'
|
228
239
|
' bool: False\n'
|
240
|
+
f'colors: ArrayColors\n'
|
241
|
+
' label: 37\n'
|
242
|
+
' key: 97\n'
|
243
|
+
' colon: 37\n'
|
244
|
+
' hyphen: 37\n'
|
245
|
+
' bool: 93\n'
|
246
|
+
' none: 33\n'
|
247
|
+
' str: 92\n'
|
248
|
+
' num: 93\n'
|
249
|
+
' times: 96\n'
|
250
|
+
' empty: 36\n'
|
251
|
+
' other: 91\n'
|
252
|
+
'params: LoggerParams\n'
|
253
|
+
' stdo_level: None\n'
|
254
|
+
' file_level: None\n'
|
255
|
+
' file_path: None\n'
|
229
256
|
'Empty: Empty\n'
|
230
|
-
'
|
231
|
-
|
257
|
+
f'Time: {UNIXMPOCH}\n'
|
258
|
+
'Duration: 2d5h')
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
def test_array_ansi_cover() -> None:
|
263
|
+
"""
|
264
|
+
Perform various tests associated with relevant routines.
|
265
|
+
"""
|
266
|
+
|
267
|
+
|
268
|
+
colors = ArrayColors()
|
269
|
+
|
270
|
+
output = strip_ansi(
|
271
|
+
array_ansi(colors))
|
272
|
+
|
273
|
+
assert output == (
|
274
|
+
'label: 37\n'
|
275
|
+
'key: 97\n'
|
276
|
+
'colon: 37\n'
|
277
|
+
'hyphen: 37\n'
|
278
|
+
'bool: 93\n'
|
279
|
+
'none: 33\n'
|
280
|
+
'str: 92\n'
|
281
|
+
'num: 93\n'
|
282
|
+
'times: 96\n'
|
283
|
+
'empty: 36\n'
|
284
|
+
'other: 91')
|
285
|
+
|
286
|
+
|
287
|
+
params = LoggerParams()
|
288
|
+
|
289
|
+
output = strip_ansi(
|
290
|
+
array_ansi(params))
|
291
|
+
|
292
|
+
assert output == (
|
293
|
+
'stdo_level: None\n'
|
294
|
+
'file_level: None\n'
|
295
|
+
'file_path: None')
|
encommon/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.15.0
|
@@ -0,0 +1,84 @@
|
|
1
|
+
encommon/__init__.py,sha256=YDGzuhpk5Gd1hq54LI0hw1NrrDvrJDrvH20TEy_0l5E,443
|
2
|
+
encommon/conftest.py,sha256=pDU0t5M2fMKPFZsbxJ1ty_dxW_BoiyEC7VoNSqNBVHc,1899
|
3
|
+
encommon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
encommon/version.txt,sha256=-EBaczDChwKNRww-41Bvh48a2F7XnB0a3BnfL_c5iRU,7
|
5
|
+
encommon/colors/__init__.py,sha256=XRiGimMj8oo040NO5a5ZsbsIUxaGVW4tf4xWTPWgnZY,269
|
6
|
+
encommon/colors/color.py,sha256=EiUxNbVL1689Cqhw1LmO9ysmN3ulCVtGZGylyV8LuVA,10884
|
7
|
+
encommon/colors/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
|
8
|
+
encommon/colors/test/test_color.py,sha256=GKYzfnOlb2yKI0qmPDxumkeQNSXpvxTprUV9pAJPV94,4566
|
9
|
+
encommon/config/__init__.py,sha256=iZdbW7A4m7iN4xt5cEeQqo0Klqs-CaPLdD5ocLmUYi8,856
|
10
|
+
encommon/config/config.py,sha256=MYFQYfQvK2lgRoXO6z8bjF4nu2G1Od2p2OSdEMDOcXo,6957
|
11
|
+
encommon/config/files.py,sha256=dSuShvIbQXFiNmpkwNVHCKDI-phBWC03OJVUfKJnfX0,2433
|
12
|
+
encommon/config/logger.py,sha256=_6JIpf2kcEtvRi4a3AMAuHnsJHup4WYo_VlhITy8CKU,14333
|
13
|
+
encommon/config/params.py,sha256=FtcWi3-CY6OHLN7o3S-iBktpS1yGt5wLVD0546XEKRY,2223
|
14
|
+
encommon/config/paths.py,sha256=6eLhqEXDyNQpwdL6QWNPf060uayuUzXyM6A3ikNC24Q,2585
|
15
|
+
encommon/config/utils.py,sha256=jZ9x6Nd7H4XZMSyAFr7mydgIu8P7xBzjHqKzMpmduw0,2127
|
16
|
+
encommon/config/test/__init__.py,sha256=Vs5Pca7QBgoyoSjk6DSpO0YFcqkUhap5-VLbaCn8MjA,304
|
17
|
+
encommon/config/test/test_config.py,sha256=XY2Vjdh79nKUt2ggj13yTQtsEZM8Dz_QdDhapgNM5Rs,2366
|
18
|
+
encommon/config/test/test_files.py,sha256=elw484lZ9pF9fhBhRWQ_xCVjFhQXd0E5BMNaB3cbMAs,2301
|
19
|
+
encommon/config/test/test_logger.py,sha256=jj-vX9v4cl0nAqb3lgDoDeDCQMzP63Ip-ek1eIh5bmc,5293
|
20
|
+
encommon/config/test/test_paths.py,sha256=f3slZZkJqnFJK4DAFbQSdnUymhap1GXc9eZmS--vNT4,2649
|
21
|
+
encommon/config/test/test_utils.py,sha256=RePpMD97HRCTkZ75ES8Eaf6_BOpcw_DknpgCFZGlQYg,1066
|
22
|
+
encommon/crypts/__init__.py,sha256=UsGEitz8rWa7DQF3iAxEbTUAbdiEnE87LSuRs4OBeAQ,371
|
23
|
+
encommon/crypts/crypts.py,sha256=fD6dXqRZ_-mHv2CX3vDBAh-Fdhm6d09uA4SEUwSdqnk,4640
|
24
|
+
encommon/crypts/hashes.py,sha256=bpQf2-Ma5SdMaEWP2nL1_9rtEQmTE0XTdDvSD-fQ9Mk,3075
|
25
|
+
encommon/crypts/params.py,sha256=2uH_i1NBMlzhq7UtWgX2jsiUGNniOK69eTCeeiQFpdw,1417
|
26
|
+
encommon/crypts/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
|
27
|
+
encommon/crypts/test/test_crypts.py,sha256=F-81-2R8_xfPMRU8QLYzfnvp01uP5BB-xA0XtmMISJE,3482
|
28
|
+
encommon/crypts/test/test_hashes.py,sha256=OmidSycLkUyso6K5Hfun2NopPXA1uL3SFqz_2aITOMM,1201
|
29
|
+
encommon/times/__init__.py,sha256=QX4iuZ59UlsMbEWbubnVJXJtrOubNxAAAv510urcLUA,972
|
30
|
+
encommon/times/common.py,sha256=HWgWBbqDoyKHIqeg4bBAZZfRM3499X3WPu8dVCzt_5o,995
|
31
|
+
encommon/times/duration.py,sha256=LTROiKcRXvPcs2Gz9KaB5Cmxo9NXd3TcMo5-jnTxPo0,10794
|
32
|
+
encommon/times/params.py,sha256=qg0mLkXVsl54m72kd9uXRvmYKqUR_Ag5PBfnTsrwQhE,4360
|
33
|
+
encommon/times/parse.py,sha256=_PF12z-UOa75SyeUpBXVn7Jjt-c-Pfnzt6pAs_PjXmQ,6496
|
34
|
+
encommon/times/time.py,sha256=8bEqBKXG3Y0BLxqmbDq8jWtBrKEJGkfPTu7ny6BwfPQ,11778
|
35
|
+
encommon/times/timer.py,sha256=oNU86QRTMfwocL9dhrw0uo1wV9ZTXW3yXYH3W2rbGRY,2889
|
36
|
+
encommon/times/timers.py,sha256=iXxT2Dyp9zSG3biIYrGGiX69gEppGQ4b_i1I7vRx5L8,9339
|
37
|
+
encommon/times/unitime.py,sha256=pO2I6qaSxR4HN82QSQYX6fo27xTP-n6bW8TahOG8c2k,1179
|
38
|
+
encommon/times/utils.py,sha256=PJ5QsKb3_pYEnD3Sz81d8QDhYQtTIj4HJfMoC9gNwmo,3100
|
39
|
+
encommon/times/window.py,sha256=tnOPz57cwIXVnOEGh7WPvBPhdjenvw1bYxV4mz721n0,8490
|
40
|
+
encommon/times/windows.py,sha256=JmkfYDu-luFJa5XoPChhKE4SC2B8Uzrk6yBkb40NKjg,10827
|
41
|
+
encommon/times/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
|
42
|
+
encommon/times/test/test_duration.py,sha256=BZLTggT87HnQcQODHXM50nW8iE-ROZF3aSPfIFddkKQ,4202
|
43
|
+
encommon/times/test/test_params.py,sha256=kHvs-WvKfPQCdCDnPU9tAyMVXmzH3eUjwQN-QdWBeh4,1407
|
44
|
+
encommon/times/test/test_parse.py,sha256=3Dihhu8xKmgbcq_dqKcO-itAeGtqAJxjGFQ6dPsJ4XM,4210
|
45
|
+
encommon/times/test/test_time.py,sha256=CrmC9dY9ROqQqYV_cQHpBPfgsiZBhrppTVfPLbSINnQ,2235
|
46
|
+
encommon/times/test/test_timer.py,sha256=w_Rh3APNmE_7OndtlIIC5YiAMEE4KImeLgF5mQWbb3o,1416
|
47
|
+
encommon/times/test/test_timers.py,sha256=X148zl5Dkm3KN-F5PW0JldJ0ntoFUJavCxBNtbnGp7E,3746
|
48
|
+
encommon/times/test/test_unitime.py,sha256=5i4UjBCw8R9h-Lw963GfB_dHBMEQhjvv1k-t27Wyyls,510
|
49
|
+
encommon/times/test/test_utils.py,sha256=WkzHJY6zOt02Ujg5FItOo1nPtktz5ss8ODmG1tRQaaw,2056
|
50
|
+
encommon/times/test/test_window.py,sha256=gNJpWVrwQTnUFQ00OLzWUuvJjWUCoiCwydohr9mevT0,6116
|
51
|
+
encommon/times/test/test_windows.py,sha256=IaaxUXqf5n9IF9X0HkRqtCdyOdeCq5DYR1ySLORA9gE,4474
|
52
|
+
encommon/types/__init__.py,sha256=_DVoVFJWd-9aCpXtPEaB3CnZ-5gt-uYxMWzquXfXHpg,1047
|
53
|
+
encommon/types/classes.py,sha256=rkaeskjMOCRAH-Rqlfgkk5zd64xIL6bSNld8TbL01Ho,1697
|
54
|
+
encommon/types/dicts.py,sha256=lC2FmPzMEj9L73jUjf3o6OVQ-LqK_3gp5nBwYibdGfo,2265
|
55
|
+
encommon/types/empty.py,sha256=n5y5maXkcM3xNYNYGK6iqvk98ivQSeguaedwc0HoMv4,2739
|
56
|
+
encommon/types/lists.py,sha256=4xn1RqS1VMsNnhR-2Xpv4ykB6d2RteFa5zdiWKzo55o,745
|
57
|
+
encommon/types/notate.py,sha256=0JIzF5VDnQ6C4umZIpgxIvd91gFo3MXTZ7Kp54S538A,6454
|
58
|
+
encommon/types/strings.py,sha256=LW2WZND64cKE1LhNip3vqsoP3elLsUP6cpS0dYnUKGE,2800
|
59
|
+
encommon/types/types.py,sha256=DbzdDLLclD1Gk8bmyhDUUWVDnJ5LdaolLV3JYKHFVgA,322
|
60
|
+
encommon/types/test/__init__.py,sha256=UIyNazTlIIdUzQS0brlD7hCPN_LYw_J6Ucxm8wh3cPU,789
|
61
|
+
encommon/types/test/test_classes.py,sha256=t4A2KXG3PP6zMH01t8R3fuvvJOAx_G67kZ3Jm8NYw00,1483
|
62
|
+
encommon/types/test/test_dicts.py,sha256=-RLkcyexCXGSyJyPx1e3QU8sNXEgtSvD9pZakdOwVvg,2702
|
63
|
+
encommon/types/test/test_empty.py,sha256=LVsZbKOg0deyKOtg_0Fhf0b_0c94LftwdDhijna-FbA,995
|
64
|
+
encommon/types/test/test_lists.py,sha256=RXvIQvr1nODutPBRx5hMsPRq_10AzBWF594KINoMgU8,437
|
65
|
+
encommon/types/test/test_notate.py,sha256=NfrDmMD6hOoVi9wlQ8yLZNnuHwS6Z7bLze70FkxOjSA,4008
|
66
|
+
encommon/types/test/test_strings.py,sha256=oXusioFMdknHeBdwlP_GakDVS9Tf2YBndjonj22UfmM,1277
|
67
|
+
encommon/utils/__init__.py,sha256=bBgh81wX_TwLgWkx0aBAyVLHNphrfcyQc1AF7-ziyNI,1027
|
68
|
+
encommon/utils/common.py,sha256=-bjGJ2UJa-WTOsVYiuZcVj1gkyH5OlRdRkJtxPw8J6k,555
|
69
|
+
encommon/utils/files.py,sha256=2uj10JfvKZHdLHNF992_LUvQ4rfMRCZGqJd7LrxKDnE,1458
|
70
|
+
encommon/utils/match.py,sha256=XvmmMKQ1q8_21zzPGuVvaZf6XwHXPZn4IWIYBEqVCQM,2471
|
71
|
+
encommon/utils/paths.py,sha256=u8-vTONG3QdnpkKfVpl19WssH95bCHg1gHlnRwzyAFM,3509
|
72
|
+
encommon/utils/sample.py,sha256=5ugSUR2aWUnW4Y2V_SMPg_r0X_7ELEAiCQAZ-w9VcpA,4839
|
73
|
+
encommon/utils/stdout.py,sha256=5gDOP7sfH6JCl5ZP578Y7bvTdv5R2L2xhdYhaFz5cJY,8575
|
74
|
+
encommon/utils/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
|
75
|
+
encommon/utils/test/test_files.py,sha256=-hdl4UOo-vH1H5gTL1r9Ib3P26DtWaD2YV32P08ykvc,679
|
76
|
+
encommon/utils/test/test_match.py,sha256=QagKpTFdRo23-Y55fSaJrSMpt5jIebScKbz0h8tivrI,1124
|
77
|
+
encommon/utils/test/test_paths.py,sha256=4AzIhQyYFEWhRWHgOZCCzomQ3Zs3EVwRnDQDa6Nq1Mc,1942
|
78
|
+
encommon/utils/test/test_sample.py,sha256=Qf-W0XbjTe5PfG87sdVizL2ymUPRTdX0qQtLGHaTgx8,3539
|
79
|
+
encommon/utils/test/test_stdout.py,sha256=fYiqEaUraD-3hFQYLxMPR4Ti_8CbTjEc8WvReXUA884,6139
|
80
|
+
encommon-0.15.0.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
|
81
|
+
encommon-0.15.0.dist-info/METADATA,sha256=0DUEJqxShp2BiG0NlnzG3TRqNTzTDJBrAESUEQZUiqQ,3362
|
82
|
+
encommon-0.15.0.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
|
83
|
+
encommon-0.15.0.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
|
84
|
+
encommon-0.15.0.dist-info/RECORD,,
|
@@ -1,89 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Functions and routines associated with Enasis Network Common Library.
|
3
|
-
|
4
|
-
This file is part of Enasis Network software eco-system. Distribution
|
5
|
-
is permitted, for more information consult the project license file.
|
6
|
-
"""
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
from ..common import STAMP_SIMPLE
|
11
|
-
from ..common import UNIXEPOCH
|
12
|
-
from ..common import UNIXHPOCH
|
13
|
-
from ..common import UNIXMPOCH
|
14
|
-
from ..times import Times
|
15
|
-
from ...types import inrepr
|
16
|
-
from ...types import instr
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
def test_Times() -> None:
|
21
|
-
"""
|
22
|
-
Perform various tests associated with relevant routines.
|
23
|
-
"""
|
24
|
-
|
25
|
-
times = Times(
|
26
|
-
UNIXEPOCH,
|
27
|
-
format=STAMP_SIMPLE)
|
28
|
-
|
29
|
-
|
30
|
-
attrs = list(times.__dict__)
|
31
|
-
|
32
|
-
assert attrs == [
|
33
|
-
'_Times__source',
|
34
|
-
'_Times__hashed']
|
35
|
-
|
36
|
-
|
37
|
-
assert inrepr(
|
38
|
-
"Times('1970-01-01T00:00",
|
39
|
-
times)
|
40
|
-
|
41
|
-
assert hash(times) > 0
|
42
|
-
|
43
|
-
assert instr(
|
44
|
-
'1970-01-01T00:00:00.000',
|
45
|
-
times)
|
46
|
-
|
47
|
-
|
48
|
-
assert int(times) == 0
|
49
|
-
assert float(times) == 0.0
|
50
|
-
|
51
|
-
assert times + 1 == Times(1)
|
52
|
-
assert times - 1 == Times(-1)
|
53
|
-
|
54
|
-
assert times == Times(0)
|
55
|
-
assert times != Times(-1)
|
56
|
-
assert times != 'invalid'
|
57
|
-
|
58
|
-
assert times > Times(-1)
|
59
|
-
assert times >= Times(0)
|
60
|
-
assert times < Times(1)
|
61
|
-
assert times <= Times(0)
|
62
|
-
|
63
|
-
|
64
|
-
assert times.source.year == 1970
|
65
|
-
|
66
|
-
assert times.epoch == 0.0
|
67
|
-
|
68
|
-
assert times.mpoch == 0.0
|
69
|
-
|
70
|
-
assert times.simple == UNIXEPOCH
|
71
|
-
|
72
|
-
assert times.subsec == UNIXMPOCH
|
73
|
-
|
74
|
-
assert times.human == UNIXHPOCH
|
75
|
-
|
76
|
-
assert times.elapsed >= 1672531200
|
77
|
-
|
78
|
-
assert times.since >= 1672531200
|
79
|
-
|
80
|
-
assert times.before == (
|
81
|
-
'1969-12-31T23:59:59.999999Z')
|
82
|
-
|
83
|
-
assert times.after == (
|
84
|
-
'1970-01-01T00:00:00.000001Z')
|
85
|
-
|
86
|
-
assert times.stamp() == UNIXMPOCH
|
87
|
-
|
88
|
-
times = times.shift('+1y')
|
89
|
-
assert times == '1971-01-01'
|
encommon-0.13.1.dist-info/RECORD
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
encommon/__init__.py,sha256=VoXUcphq-gcXCraaU47EtXBftF6UVuQPMGr0fuCTt9A,525
|
2
|
-
encommon/conftest.py,sha256=kGyQzZmT5jEIzwqhLhk2tTgNn7XbHaYYVBj3kjPU-W8,1899
|
3
|
-
encommon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
encommon/version.txt,sha256=glJlA9UeK8GWSxgHU60Cp0ZSJ66UxBdSZJ02n6ogPqs,7
|
5
|
-
encommon/config/__init__.py,sha256=iZdbW7A4m7iN4xt5cEeQqo0Klqs-CaPLdD5ocLmUYi8,856
|
6
|
-
encommon/config/config.py,sha256=d1EQ5fsexuTrsPTfs_dfmGchqysdaRa-mgXCHKJm_bM,5957
|
7
|
-
encommon/config/files.py,sha256=ueXiKTOqlQ4GKUT9lLyOlE-tfr6QAkSxdUs0VPbwEnE,2385
|
8
|
-
encommon/config/logger.py,sha256=7qjujhs0pI02gazhGpPCNa18qnuYpajVCTDlBkCtiro,14217
|
9
|
-
encommon/config/params.py,sha256=xygONdnwagGn06791nTX_mCR9hmdFl60RMe7MZr6ICw,2192
|
10
|
-
encommon/config/paths.py,sha256=f0JDqkmd1xVd9KJ6s0b5KaFk-N6MlOjz4n1W39A5JHM,2533
|
11
|
-
encommon/config/utils.py,sha256=VzTpBSZ-l6codt6vk4p4SpcmKk-H1OBy-9IUBPKP3t4,2039
|
12
|
-
encommon/config/test/__init__.py,sha256=i0JAeRcM-0YH2StGfwpaDbZV9dVribNSgFDcYcPPay8,313
|
13
|
-
encommon/config/test/test_config.py,sha256=aaCRai6tsytlDw4yHpSsTphOc6hLD2y_f8ItlGzISO4,2501
|
14
|
-
encommon/config/test/test_files.py,sha256=qJgavSxTxilHOnGzfF6fBpViOmKFGcBdupOIRhDsXuk,2295
|
15
|
-
encommon/config/test/test_logger.py,sha256=6X_ZYhKExvZsXo2o8FXneYi1uUekSj-t_B3u5wmeIDM,5246
|
16
|
-
encommon/config/test/test_paths.py,sha256=jCrSEnPkZprsJSvolsfTKoyuYqxqyQdDymL9yk3elvQ,2633
|
17
|
-
encommon/config/test/test_utils.py,sha256=RePpMD97HRCTkZ75ES8Eaf6_BOpcw_DknpgCFZGlQYg,1066
|
18
|
-
encommon/crypts/__init__.py,sha256=UsGEitz8rWa7DQF3iAxEbTUAbdiEnE87LSuRs4OBeAQ,371
|
19
|
-
encommon/crypts/crypts.py,sha256=fD6dXqRZ_-mHv2CX3vDBAh-Fdhm6d09uA4SEUwSdqnk,4640
|
20
|
-
encommon/crypts/hashes.py,sha256=bpQf2-Ma5SdMaEWP2nL1_9rtEQmTE0XTdDvSD-fQ9Mk,3075
|
21
|
-
encommon/crypts/params.py,sha256=AfuGbFvLPDdfGgday34T1Jb7NzGLi-R7tJQ_f5gVcRk,923
|
22
|
-
encommon/crypts/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
|
23
|
-
encommon/crypts/test/test_crypts.py,sha256=gFkCA4-M2DLudP9nBpgU6sSchyWU1gtbvCWe6T0wg5I,3469
|
24
|
-
encommon/crypts/test/test_hashes.py,sha256=JYpPit7ISv6u-5-HbC3wSCxuieySDLKawgnE7-xHgTY,1180
|
25
|
-
encommon/times/__init__.py,sha256=aa3Wb2WBpZcf_RBgZu4vM3lEyPZhyuZicG5Fcg0DgEI,931
|
26
|
-
encommon/times/common.py,sha256=g7kkZLyodZCIPpdiPCZh0-UMHwn-rwCv_Y6gdSvek6k,988
|
27
|
-
encommon/times/duration.py,sha256=LTROiKcRXvPcs2Gz9KaB5Cmxo9NXd3TcMo5-jnTxPo0,10794
|
28
|
-
encommon/times/params.py,sha256=qwfy7cw9_UlWUm2xWm1aRjJJZzZp36w3Bo3Rc-HU2hM,3515
|
29
|
-
encommon/times/parse.py,sha256=DXoT_NyWL2Ea_j3vlGHMDY-5P6NBeYHyGhJoiavgBS0,6144
|
30
|
-
encommon/times/timer.py,sha256=19dt7A5nJEUdr_0p3WDFGO-Q49OHt3sgPW4R2zHoScU,2901
|
31
|
-
encommon/times/timers.py,sha256=X3Aeutsp-GIEqYOxO0cXmNhTehHvT_aMgWogXI3T87Q,9343
|
32
|
-
encommon/times/times.py,sha256=FBOAVY1H21OV4BjGHj6iJrYbGQpSkWPj3Ss2Vepdvu4,9682
|
33
|
-
encommon/times/utils.py,sha256=PJ5QsKb3_pYEnD3Sz81d8QDhYQtTIj4HJfMoC9gNwmo,3100
|
34
|
-
encommon/times/window.py,sha256=3ctrDd0UWvnwrqxRZf7M-mVeEYVWvet6GZTj17YQ9sU,8526
|
35
|
-
encommon/times/windows.py,sha256=YJd1Tq97Eo2jUjIBvvhg-828A6BxecuHKSXhqIe9bSs,10838
|
36
|
-
encommon/times/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
|
37
|
-
encommon/times/test/test_duration.py,sha256=ofCBdQ4-tOKP5W5U2xyTaZrCVvD-dWEgnYoCvZ99MuA,4189
|
38
|
-
encommon/times/test/test_params.py,sha256=kHvs-WvKfPQCdCDnPU9tAyMVXmzH3eUjwQN-QdWBeh4,1407
|
39
|
-
encommon/times/test/test_parse.py,sha256=ozP8PBgIsqdknK8cEtlYA3KusKnJzbjfAUKhcFv_eFk,4054
|
40
|
-
encommon/times/test/test_timer.py,sha256=A5pBmkd1i71LTpG-uA9-9UGNJUK8tkw6by8Adm0AbGE,1400
|
41
|
-
encommon/times/test/test_timers.py,sha256=Kj5AgzNTCNb2vEep2zpTED6JpJ_1S5j-Kt1Bm17zkdg,3761
|
42
|
-
encommon/times/test/test_times.py,sha256=vxEtXI9gYFlWnBLsyPyi17a96MJzgcI79SCy8U1Co8I,1748
|
43
|
-
encommon/times/test/test_utils.py,sha256=WkzHJY6zOt02Ujg5FItOo1nPtktz5ss8ODmG1tRQaaw,2056
|
44
|
-
encommon/times/test/test_window.py,sha256=Sx_fd0J1ofaFx52t-uWz9Isa9KqBxPFnynzfGfiG7uo,6098
|
45
|
-
encommon/times/test/test_windows.py,sha256=YJJ3-vN4bs2cGCUcGyo8-w4mQlt7fxuek17xCpvZRE8,4484
|
46
|
-
encommon/types/__init__.py,sha256=L1pdigJyPNPEoAkkbCHM9IhmFtU2GjFRxHMRTAnPqKk,667
|
47
|
-
encommon/types/dicts.py,sha256=lC2FmPzMEj9L73jUjf3o6OVQ-LqK_3gp5nBwYibdGfo,2265
|
48
|
-
encommon/types/empty.py,sha256=n5y5maXkcM3xNYNYGK6iqvk98ivQSeguaedwc0HoMv4,2739
|
49
|
-
encommon/types/notate.py,sha256=jRZ34u_7hvBw58nlXTSxxm21f9-zVr8g9YLfw9qfC0E,6428
|
50
|
-
encommon/types/strings.py,sha256=oFPRrJuK3ey5FHeHoUTPoinpYlwuJmcbi0UQjRupEM4,2175
|
51
|
-
encommon/types/test/__init__.py,sha256=UIyNazTlIIdUzQS0brlD7hCPN_LYw_J6Ucxm8wh3cPU,789
|
52
|
-
encommon/types/test/test_dicts.py,sha256=-RLkcyexCXGSyJyPx1e3QU8sNXEgtSvD9pZakdOwVvg,2702
|
53
|
-
encommon/types/test/test_empty.py,sha256=4GiBs3xulfTnJ5xuGm2hM_PRcHspYEj5tAaLd4Trhyc,973
|
54
|
-
encommon/types/test/test_notate.py,sha256=NfrDmMD6hOoVi9wlQ8yLZNnuHwS6Z7bLze70FkxOjSA,4008
|
55
|
-
encommon/types/test/test_strings.py,sha256=AgDXL3qiKcl1Fzx7lVsnW1ejEB13fXKpvELwG48OcSw,1084
|
56
|
-
encommon/utils/__init__.py,sha256=9l_Kg8NKGBYJevHty0kPtDNp1NoAd32RHuBiwaVBdh8,925
|
57
|
-
encommon/utils/common.py,sha256=-bjGJ2UJa-WTOsVYiuZcVj1gkyH5OlRdRkJtxPw8J6k,555
|
58
|
-
encommon/utils/files.py,sha256=2uj10JfvKZHdLHNF992_LUvQ4rfMRCZGqJd7LrxKDnE,1458
|
59
|
-
encommon/utils/match.py,sha256=XvmmMKQ1q8_21zzPGuVvaZf6XwHXPZn4IWIYBEqVCQM,2471
|
60
|
-
encommon/utils/paths.py,sha256=bY7FNLG0hIN-ZUQGefwygYXJtAkfWG9vhOB5ixheaqQ,3550
|
61
|
-
encommon/utils/sample.py,sha256=VC1jYTCfZJPRV9OrzDqSoQWQ69V3KP6ZWpwid6VleIM,3240
|
62
|
-
encommon/utils/stdout.py,sha256=HAeN22KFd8nOYuH98bFPvJyAc1KGhdGydmITnf-DyG0,7531
|
63
|
-
encommon/utils/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
|
64
|
-
encommon/utils/test/test_files.py,sha256=-hdl4UOo-vH1H5gTL1r9Ib3P26DtWaD2YV32P08ykvc,679
|
65
|
-
encommon/utils/test/test_match.py,sha256=QagKpTFdRo23-Y55fSaJrSMpt5jIebScKbz0h8tivrI,1124
|
66
|
-
encommon/utils/test/test_paths.py,sha256=1yiZp5PCxljGk0J6fwIfWOUl-KWz40INybrwrN3JIog,1945
|
67
|
-
encommon/utils/test/test_sample.py,sha256=sHAeWOL1mchTGYGQaFK_A3Z28tThuULumm9kQebnIdk,1710
|
68
|
-
encommon/utils/test/test_stdout.py,sha256=TA7xQuFoPZUYW2l00e04MGp4P9gHkkVxVflvPlhpQXg,4878
|
69
|
-
encommon-0.13.1.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
|
70
|
-
encommon-0.13.1.dist-info/METADATA,sha256=htIjSIbgh311LEIe9kU3rz11p0vk3orU5YhXC9Mdlw8,3362
|
71
|
-
encommon-0.13.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
72
|
-
encommon-0.13.1.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
|
73
|
-
encommon-0.13.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|