iker-python-common 1.0.47__tar.gz → 1.0.49__tar.gz
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.
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/PKG-INFO +1 -1
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/dtutils.py +41 -20
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/PKG-INFO +1 -1
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/dtutils_test.py +43 -25
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/.editorconfig +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/.github/workflows/pr.yml +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/.github/workflows/push.yml +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/.gitignore +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/MANIFEST.in +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/README.md +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/VERSION +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/pyproject.toml +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/config/config.cfg +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/csv/data.csv +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/csv/data.tsv +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.baz/file.bar.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.baz/file.foo.bar +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.baz/file.foo.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/file.bar +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/file.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/file.foo +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.baz/file.bar.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.baz/file.foo.bar +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.baz/file.foo.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/file.bar +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/file.baz +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/file.foo +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/setup.cfg +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/setup.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/__init__.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/__init__.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/argutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/config.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/csv.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/dbutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/dockerutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/funcutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/jsonutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/logger.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/numutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/randutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/retry.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/s3utils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/sequtils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/shutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/span.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/strutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/testutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/typeutils.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/SOURCES.txt +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/dependency_links.txt +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/not-zip-safe +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/requires.txt +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/top_level.txt +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/__init__.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/argutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/config_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/csv_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/dbutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/dockerutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/funcutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/jsonutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/logger_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/numutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/randutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/retry_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/s3utils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/sequtils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/shutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/span_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/strutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/testutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/typeutils_test.py +0 -0
- {iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/docker_fixtures.py +0 -0
|
@@ -22,6 +22,8 @@ __all__ = [
|
|
|
22
22
|
"dt_utc_infinity",
|
|
23
23
|
"dt_utc_now",
|
|
24
24
|
"dt_utc",
|
|
25
|
+
"td_to_us",
|
|
26
|
+
"td_from_us",
|
|
25
27
|
"dt_to_ts",
|
|
26
28
|
"dt_to_ts_us",
|
|
27
29
|
"dt_from_ts",
|
|
@@ -44,16 +46,16 @@ def basic_date_format() -> str:
|
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
@memorized
|
|
47
|
-
def basic_time_format(
|
|
49
|
+
def basic_time_format(with_us: bool = False, with_tz: bool = False) -> str:
|
|
48
50
|
"""
|
|
49
|
-
Returns the basic time format string, with optional
|
|
51
|
+
Returns the basic time format string, with optional microseconds and timezone.
|
|
50
52
|
|
|
51
|
-
:param
|
|
53
|
+
:param with_us: If ``True``, include microseconds in the format.
|
|
52
54
|
:param with_tz: If ``True``, include timezone in the format.
|
|
53
55
|
:return: The basic time format string.
|
|
54
56
|
"""
|
|
55
57
|
fmt_str = "T%H%M%S"
|
|
56
|
-
if
|
|
58
|
+
if with_us:
|
|
57
59
|
fmt_str = fmt_str + ".%f"
|
|
58
60
|
if with_tz:
|
|
59
61
|
fmt_str = fmt_str + "%z"
|
|
@@ -61,15 +63,15 @@ def basic_time_format(with_ms: bool = False, with_tz: bool = False) -> str:
|
|
|
61
63
|
|
|
62
64
|
|
|
63
65
|
@memorized
|
|
64
|
-
def basic_format(
|
|
66
|
+
def basic_format(with_us: bool = False, with_tz: bool = False) -> str:
|
|
65
67
|
"""
|
|
66
|
-
Returns the basic combined date and time format string, with optional
|
|
68
|
+
Returns the basic combined date and time format string, with optional microseconds and timezone.
|
|
67
69
|
|
|
68
|
-
:param
|
|
70
|
+
:param with_us: If ``True``, include microseconds in the time format.
|
|
69
71
|
:param with_tz: If ``True``, include timezone in the time format.
|
|
70
72
|
:return: The basic combined date and time format string.
|
|
71
73
|
"""
|
|
72
|
-
return basic_date_format() + basic_time_format(
|
|
74
|
+
return basic_date_format() + basic_time_format(with_us, with_tz)
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
@singleton
|
|
@@ -83,16 +85,16 @@ def extended_date_format() -> str:
|
|
|
83
85
|
|
|
84
86
|
|
|
85
87
|
@memorized
|
|
86
|
-
def extended_time_format(
|
|
88
|
+
def extended_time_format(with_us: bool = False, with_tz: bool = False) -> str:
|
|
87
89
|
"""
|
|
88
|
-
Returns the extended time format string, with optional
|
|
90
|
+
Returns the extended time format string, with optional microseconds and timezone.
|
|
89
91
|
|
|
90
|
-
:param
|
|
92
|
+
:param with_us: If ``True``, include microseconds in the format.
|
|
91
93
|
:param with_tz: If ``True``, include timezone in the format.
|
|
92
94
|
:return: The extended time format string.
|
|
93
95
|
"""
|
|
94
96
|
fmt_str = "T%H:%M:%S"
|
|
95
|
-
if
|
|
97
|
+
if with_us:
|
|
96
98
|
fmt_str = fmt_str + ".%f"
|
|
97
99
|
if with_tz:
|
|
98
100
|
fmt_str = fmt_str + "%:z"
|
|
@@ -100,15 +102,15 @@ def extended_time_format(with_ms: bool = False, with_tz: bool = False) -> str:
|
|
|
100
102
|
|
|
101
103
|
|
|
102
104
|
@memorized
|
|
103
|
-
def extended_format(
|
|
105
|
+
def extended_format(with_us: bool = False, with_tz: bool = False) -> str:
|
|
104
106
|
"""
|
|
105
|
-
Returns the extended combined date and time format string, with optional
|
|
107
|
+
Returns the extended combined date and time format string, with optional microseconds and timezone.
|
|
106
108
|
|
|
107
|
-
:param
|
|
109
|
+
:param with_us: If ``True``, include microseconds in the time format.
|
|
108
110
|
:param with_tz: If ``True``, include timezone in the time format.
|
|
109
111
|
:return: The extended combined date and time format string.
|
|
110
112
|
"""
|
|
111
|
-
return extended_date_format() + extended_time_format(
|
|
113
|
+
return extended_date_format() + extended_time_format(with_us, with_tz)
|
|
112
114
|
|
|
113
115
|
|
|
114
116
|
iso_date_format = extended_date_format
|
|
@@ -120,7 +122,7 @@ iso_format = extended_format
|
|
|
120
122
|
def iso_formats() -> list[str]:
|
|
121
123
|
"""
|
|
122
124
|
Returns a list of supported ISO 8601 date and time format strings, including both basic and extended forms, with
|
|
123
|
-
optional
|
|
125
|
+
optional microseconds and timezone.
|
|
124
126
|
|
|
125
127
|
:return: A list of ISO 8601 format strings.
|
|
126
128
|
"""
|
|
@@ -207,6 +209,26 @@ def dt_utc(
|
|
|
207
209
|
return datetime.datetime(year, month, day, hour, minute, second, microsecond, tzinfo=datetime.timezone.utc)
|
|
208
210
|
|
|
209
211
|
|
|
212
|
+
def td_to_us(td: datetime.timedelta) -> int:
|
|
213
|
+
"""
|
|
214
|
+
Returns the total number of microseconds in the given ``timedelta``.
|
|
215
|
+
|
|
216
|
+
:param td: The ``timedelta`` to convert.
|
|
217
|
+
:return: The total number of microseconds in ``td``.
|
|
218
|
+
"""
|
|
219
|
+
return (td.days * 86400 + td.seconds) * 1000000 + td.microseconds
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def td_from_us(us: int) -> datetime.timedelta:
|
|
223
|
+
"""
|
|
224
|
+
Returns a ``timedelta`` representing the given number of microseconds.
|
|
225
|
+
|
|
226
|
+
:param us: The number of microseconds.
|
|
227
|
+
:return: The corresponding ``timedelta``.
|
|
228
|
+
"""
|
|
229
|
+
return datetime.timedelta(microseconds=us)
|
|
230
|
+
|
|
231
|
+
|
|
210
232
|
def dt_to_td(dt: datetime.datetime) -> datetime.timedelta:
|
|
211
233
|
"""
|
|
212
234
|
Returns the ``timedelta`` between the given ``datetime`` and the POSIX epoch.
|
|
@@ -234,8 +256,7 @@ def dt_to_ts_us(dt: datetime.datetime) -> int:
|
|
|
234
256
|
:param dt: The ``datetime`` to convert.
|
|
235
257
|
:return: The timestamp in microseconds from the POSIX epoch.
|
|
236
258
|
"""
|
|
237
|
-
|
|
238
|
-
return (td.days * 86400 + td.seconds) * 1000000 + td.microseconds
|
|
259
|
+
return td_to_us(dt_to_td(dt))
|
|
239
260
|
|
|
240
261
|
|
|
241
262
|
def dt_from_td(td: datetime.timedelta) -> datetime.datetime:
|
|
@@ -265,7 +286,7 @@ def dt_from_ts_us(ts: int) -> datetime.datetime:
|
|
|
265
286
|
:param ts: Timestamp in microseconds from the POSIX epoch.
|
|
266
287
|
:return: The corresponding UTC datetime.
|
|
267
288
|
"""
|
|
268
|
-
return dt_from_td(
|
|
289
|
+
return dt_from_td(td_from_us(ts))
|
|
269
290
|
|
|
270
291
|
|
|
271
292
|
basic_date_regex: re.Pattern[str] = re.compile(r"(\d{4})(\d{2})(\d{2})")
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/dtutils_test.py
RENAMED
|
@@ -2,7 +2,7 @@ import unittest
|
|
|
2
2
|
|
|
3
3
|
import ddt
|
|
4
4
|
|
|
5
|
-
from iker.common.utils.dtutils import basic_format, extended_format, iso_format
|
|
5
|
+
from iker.common.utils.dtutils import basic_format, extended_format, iso_format, td_from_us, td_to_us
|
|
6
6
|
from iker.common.utils.dtutils import dt_format, dt_format_iso, dt_parse, dt_parse_iso
|
|
7
7
|
from iker.common.utils.dtutils import dt_from_ts, dt_from_ts_us, dt_to_ts, dt_to_ts_us
|
|
8
8
|
from iker.common.utils.dtutils import dt_utc
|
|
@@ -35,6 +35,24 @@ class DtUtilsTest(unittest.TestCase):
|
|
|
35
35
|
self.assertEqual(dt_parse_iso("1970-01-01T00:00:00.000000+00:00"), dt_utc_epoch())
|
|
36
36
|
self.assertEqual(dt_parse_iso("1970-01-01T00:00:00.000000"), dt_utc_epoch())
|
|
37
37
|
|
|
38
|
+
data_td_us_roundtrip = [
|
|
39
|
+
(0,),
|
|
40
|
+
(1,),
|
|
41
|
+
(999,),
|
|
42
|
+
(1000,),
|
|
43
|
+
(999999,),
|
|
44
|
+
(1000000,),
|
|
45
|
+
(60000000,),
|
|
46
|
+
(3600000000,),
|
|
47
|
+
(86400000000,),
|
|
48
|
+
(31536000000000,),
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
@ddt.idata(data_td_us_roundtrip)
|
|
52
|
+
@ddt.unpack
|
|
53
|
+
def test_td_us_roundtrip(self, data):
|
|
54
|
+
self.assertEqual(data, td_to_us(td_from_us(data)))
|
|
55
|
+
|
|
38
56
|
data_dt_to_ts = [
|
|
39
57
|
(dt_utc(1970, 1, 1), 0.0),
|
|
40
58
|
(dt_utc(1969, 12, 31, 23, 59, 59), -1.0),
|
|
@@ -149,45 +167,45 @@ class DtUtilsTest(unittest.TestCase):
|
|
|
149
167
|
|
|
150
168
|
data_dt_parse = [
|
|
151
169
|
("00010101T000000", basic_format(), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
152
|
-
("00010101T000000.000000", basic_format(
|
|
170
|
+
("00010101T000000.000000", basic_format(with_us=True), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
153
171
|
("00010101T000000+0000", basic_format(with_tz=True), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
154
|
-
("00010101T000000.000000+0000", basic_format(
|
|
172
|
+
("00010101T000000.000000+0000", basic_format(with_us=True, with_tz=True), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
155
173
|
("19700101T000000", basic_format(), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
156
|
-
("19700101T000000.000000", basic_format(
|
|
174
|
+
("19700101T000000.000000", basic_format(with_us=True), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
157
175
|
("19700101T000000+0000", basic_format(with_tz=True), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
158
|
-
("19700101T000000.000000+0000", basic_format(
|
|
176
|
+
("19700101T000000.000000+0000", basic_format(with_us=True, with_tz=True), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
159
177
|
("99991231T235959",
|
|
160
178
|
basic_format(),
|
|
161
179
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
162
180
|
("99991231T235959.000000",
|
|
163
|
-
basic_format(
|
|
181
|
+
basic_format(with_us=True),
|
|
164
182
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
165
183
|
("99991231T235959+0000",
|
|
166
184
|
basic_format(with_tz=True),
|
|
167
185
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
168
186
|
("99991231T235959.000000+0000",
|
|
169
|
-
basic_format(
|
|
187
|
+
basic_format(with_us=True, with_tz=True),
|
|
170
188
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
171
189
|
|
|
172
190
|
("0001-01-01T00:00:00", extended_format(), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
173
|
-
("0001-01-01T00:00:00.000000", extended_format(
|
|
191
|
+
("0001-01-01T00:00:00.000000", extended_format(with_us=True), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
174
192
|
("0001-01-01T00:00:00+00:00", extended_format(with_tz=True), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
175
|
-
("0001-01-01T00:00:00.000000+00:00", extended_format(
|
|
193
|
+
("0001-01-01T00:00:00.000000+00:00", extended_format(with_us=True, with_tz=True), dt_utc(1, 1, 1, 0, 0, 0)),
|
|
176
194
|
("1970-01-01T00:00:00", extended_format(), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
177
|
-
("1970-01-01T00:00:00.000000", extended_format(
|
|
195
|
+
("1970-01-01T00:00:00.000000", extended_format(with_us=True), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
178
196
|
("1970-01-01T00:00:00+00:00", extended_format(with_tz=True), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
179
|
-
("1970-01-01T00:00:00.000000+00:00", extended_format(
|
|
197
|
+
("1970-01-01T00:00:00.000000+00:00", extended_format(with_us=True, with_tz=True), dt_utc(1970, 1, 1, 0, 0, 0)),
|
|
180
198
|
("9999-12-31T23:59:59",
|
|
181
199
|
extended_format(),
|
|
182
200
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
183
201
|
("9999-12-31T23:59:59.000000",
|
|
184
|
-
extended_format(
|
|
202
|
+
extended_format(with_us=True),
|
|
185
203
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
186
204
|
("9999-12-31T23:59:59+00:00",
|
|
187
205
|
extended_format(with_tz=True),
|
|
188
206
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
189
207
|
("9999-12-31T23:59:59.000000+00:00",
|
|
190
|
-
extended_format(
|
|
208
|
+
extended_format(with_us=True, with_tz=True),
|
|
191
209
|
dt_utc(9999, 12, 31, 23, 59, 59)),
|
|
192
210
|
|
|
193
211
|
("0001-01-01T00:00:00", "%Y-%m-%dT%H:%M:%S", dt_utc(1, 1, 1, 0, 0, 0)),
|
|
@@ -230,45 +248,45 @@ class DtUtilsTest(unittest.TestCase):
|
|
|
230
248
|
|
|
231
249
|
data_dt_format = [
|
|
232
250
|
(dt_utc(1, 1, 1, 0, 0, 0), basic_format(), "00010101T000000"),
|
|
233
|
-
(dt_utc(1, 1, 1, 0, 0, 0), basic_format(
|
|
251
|
+
(dt_utc(1, 1, 1, 0, 0, 0), basic_format(with_us=True), "00010101T000000.000000"),
|
|
234
252
|
(dt_utc(1, 1, 1, 0, 0, 0), basic_format(with_tz=True), "00010101T000000+0000"),
|
|
235
|
-
(dt_utc(1, 1, 1, 0, 0, 0), basic_format(
|
|
253
|
+
(dt_utc(1, 1, 1, 0, 0, 0), basic_format(with_us=True, with_tz=True), "00010101T000000.000000+0000"),
|
|
236
254
|
(dt_utc(1970, 1, 1, 0, 0, 0), basic_format(), "19700101T000000"),
|
|
237
|
-
(dt_utc(1970, 1, 1, 0, 0, 0), basic_format(
|
|
255
|
+
(dt_utc(1970, 1, 1, 0, 0, 0), basic_format(with_us=True), "19700101T000000.000000"),
|
|
238
256
|
(dt_utc(1970, 1, 1, 0, 0, 0), basic_format(with_tz=True), "19700101T000000+0000"),
|
|
239
|
-
(dt_utc(1970, 1, 1, 0, 0, 0), basic_format(
|
|
257
|
+
(dt_utc(1970, 1, 1, 0, 0, 0), basic_format(with_us=True, with_tz=True), "19700101T000000.000000+0000"),
|
|
240
258
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
241
259
|
basic_format(),
|
|
242
260
|
"99991231T235959"),
|
|
243
261
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
244
|
-
basic_format(
|
|
262
|
+
basic_format(with_us=True),
|
|
245
263
|
"99991231T235959.000000"),
|
|
246
264
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
247
265
|
basic_format(with_tz=True),
|
|
248
266
|
"99991231T235959+0000"),
|
|
249
267
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
250
|
-
basic_format(
|
|
268
|
+
basic_format(with_us=True, with_tz=True),
|
|
251
269
|
"99991231T235959.000000+0000"),
|
|
252
270
|
|
|
253
271
|
(dt_utc(1, 1, 1, 0, 0, 0), extended_format(), "0001-01-01T00:00:00"),
|
|
254
|
-
(dt_utc(1, 1, 1, 0, 0, 0), extended_format(
|
|
272
|
+
(dt_utc(1, 1, 1, 0, 0, 0), extended_format(with_us=True), "0001-01-01T00:00:00.000000"),
|
|
255
273
|
(dt_utc(1, 1, 1, 0, 0, 0), extended_format(with_tz=True), "0001-01-01T00:00:00+00:00"),
|
|
256
|
-
(dt_utc(1, 1, 1, 0, 0, 0), extended_format(
|
|
274
|
+
(dt_utc(1, 1, 1, 0, 0, 0), extended_format(with_us=True, with_tz=True), "0001-01-01T00:00:00.000000+00:00"),
|
|
257
275
|
(dt_utc(1970, 1, 1, 0, 0, 0), extended_format(), "1970-01-01T00:00:00"),
|
|
258
|
-
(dt_utc(1970, 1, 1, 0, 0, 0), extended_format(
|
|
276
|
+
(dt_utc(1970, 1, 1, 0, 0, 0), extended_format(with_us=True), "1970-01-01T00:00:00.000000"),
|
|
259
277
|
(dt_utc(1970, 1, 1, 0, 0, 0), extended_format(with_tz=True), "1970-01-01T00:00:00+00:00"),
|
|
260
|
-
(dt_utc(1970, 1, 1, 0, 0, 0), extended_format(
|
|
278
|
+
(dt_utc(1970, 1, 1, 0, 0, 0), extended_format(with_us=True, with_tz=True), "1970-01-01T00:00:00.000000+00:00"),
|
|
261
279
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
262
280
|
extended_format(),
|
|
263
281
|
"9999-12-31T23:59:59"),
|
|
264
282
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
265
|
-
extended_format(
|
|
283
|
+
extended_format(with_us=True),
|
|
266
284
|
"9999-12-31T23:59:59.000000"),
|
|
267
285
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
268
286
|
extended_format(with_tz=True),
|
|
269
287
|
"9999-12-31T23:59:59+00:00"),
|
|
270
288
|
(dt_utc(9999, 12, 31, 23, 59, 59),
|
|
271
|
-
extended_format(
|
|
289
|
+
extended_format(with_us=True, with_tz=True),
|
|
272
290
|
"9999-12-31T23:59:59.000000+00:00"),
|
|
273
291
|
|
|
274
292
|
(dt_utc(9999, 12, 31, 23, 59, 59), "%Y-%m-%dT%H:%M:%S", "9999-12-31T23:59:59"),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/config/config.cfg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/file.bar
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/file.baz
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/s3utils/dir.foo/file.foo
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/file.bar
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/file.baz
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/resources/unittest/shutils/dir.foo/file.foo
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker/common/utils/dockerutils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/src/iker_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/config_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/csv_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/dbutils_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/logger_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/retry_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/s3utils_test.py
RENAMED
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/shutils_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.47 → iker_python_common-1.0.49}/test/iker_tests/common/utils/span_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|