wwvb 4.0.0a0__py3-none-any.whl → 5.0.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.
- uwwvb.py +1 -1
- wwvb/__init__.py +7 -5
- wwvb/__version__.py +2 -2
- wwvb/decode.py +5 -2
- wwvb/dut1table.py +2 -2
- wwvb/gen.py +2 -3
- wwvb/iersdata.json +1 -0
- wwvb/iersdata.json.license +2 -0
- wwvb/iersdata.py +20 -11
- wwvb/tz.py +1 -2
- wwvb/updateiers.py +19 -57
- wwvb/wwvbtk.py +5 -3
- {wwvb-4.0.0a0.dist-info → wwvb-5.0.0.dist-info}/METADATA +6 -5
- wwvb-5.0.0.dist-info/RECORD +18 -0
- {wwvb-4.0.0a0.dist-info → wwvb-5.0.0.dist-info}/WHEEL +1 -1
- wwvb/iersdata_dist.py +0 -38
- wwvb/testcli.py +0 -291
- wwvb/testdaylight.py +0 -60
- wwvb/testls.py +0 -63
- wwvb/testpm.py +0 -33
- wwvb/testuwwvb.py +0 -221
- wwvb/testwwvb.py +0 -403
- wwvb-4.0.0a0.dist-info/RECORD +0 -23
- {wwvb-4.0.0a0.dist-info → wwvb-5.0.0.dist-info}/entry_points.txt +0 -0
- {wwvb-4.0.0a0.dist-info → wwvb-5.0.0.dist-info}/top_level.txt +0 -0
wwvb/testwwvb.py
DELETED
@@ -1,403 +0,0 @@
|
|
1
|
-
#!/usr/bin/python3
|
2
|
-
# ruff: noqa: E501
|
3
|
-
|
4
|
-
"""Test most wwvblib functionality"""
|
5
|
-
|
6
|
-
# Copyright (C) 2011-2020 Jeff Epler <jepler@gmail.com>
|
7
|
-
# SPDX-FileCopyrightText: 2021 Jeff Epler
|
8
|
-
#
|
9
|
-
# SPDX-License-Identifier: GPL-3.0-only
|
10
|
-
|
11
|
-
from __future__ import annotations
|
12
|
-
|
13
|
-
import copy
|
14
|
-
import datetime
|
15
|
-
import io
|
16
|
-
import pathlib
|
17
|
-
import random
|
18
|
-
import sys
|
19
|
-
import unittest
|
20
|
-
|
21
|
-
import uwwvb
|
22
|
-
|
23
|
-
import wwvb
|
24
|
-
|
25
|
-
from . import decode, iersdata, tz
|
26
|
-
|
27
|
-
|
28
|
-
class WWVBMinute2k(wwvb.WWVBMinute):
|
29
|
-
"""Treats the origin of the 2-digit epoch as 2000"""
|
30
|
-
|
31
|
-
epoch = 2000
|
32
|
-
|
33
|
-
|
34
|
-
class WWVBTestCase(unittest.TestCase):
|
35
|
-
"""Test each expected output in tests/. Some outputs are from another program, some are from us"""
|
36
|
-
|
37
|
-
maxDiff = 131072
|
38
|
-
|
39
|
-
def test_cases(self) -> None:
|
40
|
-
"""Generate a test case for each expected output in tests/"""
|
41
|
-
for test in pathlib.Path("tests").glob("*"):
|
42
|
-
with self.subTest(test=test):
|
43
|
-
text = test.read_text(encoding="utf-8")
|
44
|
-
lines = [line for line in text.split("\n") if not line.startswith("#")]
|
45
|
-
while not lines[0]:
|
46
|
-
del lines[0]
|
47
|
-
text = "\n".join(lines)
|
48
|
-
header = lines[0].split()
|
49
|
-
timestamp = " ".join(header[:10])
|
50
|
-
options = header[10:]
|
51
|
-
channel = "amplitude"
|
52
|
-
style = "default"
|
53
|
-
for o in options:
|
54
|
-
if o.startswith("--channel="):
|
55
|
-
channel = o[10:]
|
56
|
-
elif o.startswith("--style="):
|
57
|
-
style = o[8:]
|
58
|
-
else:
|
59
|
-
raise ValueError(f"Unknown option {o!r}")
|
60
|
-
num_minutes = len(lines) - 2
|
61
|
-
if channel == "both":
|
62
|
-
num_minutes = len(lines) // 3
|
63
|
-
|
64
|
-
num_headers = sum(line.startswith("WWVB timecode") for line in lines)
|
65
|
-
if num_headers > 1:
|
66
|
-
all_timecodes = True
|
67
|
-
num_minutes = num_headers
|
68
|
-
else:
|
69
|
-
all_timecodes = False
|
70
|
-
|
71
|
-
w = wwvb.WWVBMinute.fromstring(timestamp)
|
72
|
-
result = io.StringIO()
|
73
|
-
wwvb.print_timecodes(
|
74
|
-
w,
|
75
|
-
num_minutes,
|
76
|
-
channel=channel,
|
77
|
-
style=style,
|
78
|
-
all_timecodes=all_timecodes,
|
79
|
-
file=result,
|
80
|
-
)
|
81
|
-
result_str = result.getvalue()
|
82
|
-
self.assertEqual(text, result_str)
|
83
|
-
|
84
|
-
|
85
|
-
class WWVBRoundtrip(unittest.TestCase):
|
86
|
-
"""Round-trip tests"""
|
87
|
-
|
88
|
-
def test_decode(self) -> None:
|
89
|
-
"""Test that a range of minutes including a leap second are correctly decoded by the state-based decoder"""
|
90
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(datetime.datetime(1992, 6, 30, 23, 50, tzinfo=datetime.timezone.utc))
|
91
|
-
decoder = decode.wwvbreceive()
|
92
|
-
next(decoder)
|
93
|
-
decoder.send(wwvb.AmplitudeModulation.MARK)
|
94
|
-
any_leap_second = False
|
95
|
-
for _ in range(20):
|
96
|
-
timecode = minute.as_timecode()
|
97
|
-
decoded: wwvb.WWVBTimecode | None = None
|
98
|
-
if len(timecode.am) == 61:
|
99
|
-
any_leap_second = True
|
100
|
-
for code in timecode.am:
|
101
|
-
decoded = decoder.send(code) or decoded
|
102
|
-
assert decoded
|
103
|
-
self.assertEqual(
|
104
|
-
timecode.am[:60],
|
105
|
-
decoded.am,
|
106
|
-
f"Checking equality of minute {minute}: [expected] {timecode.am} != [actual] {decoded.am}",
|
107
|
-
)
|
108
|
-
minute = minute.next_minute()
|
109
|
-
self.assertTrue(any_leap_second)
|
110
|
-
|
111
|
-
def test_cover_fill_pm_timecode_extended(self) -> None:
|
112
|
-
"""Get full coverage of the function pm_timecode_extended"""
|
113
|
-
for dt in (
|
114
|
-
datetime.datetime(1992, 1, 1, tzinfo=datetime.timezone.utc),
|
115
|
-
datetime.datetime(1992, 4, 5, tzinfo=datetime.timezone.utc),
|
116
|
-
datetime.datetime(1992, 6, 1, tzinfo=datetime.timezone.utc),
|
117
|
-
datetime.datetime(1992, 10, 25, tzinfo=datetime.timezone.utc),
|
118
|
-
):
|
119
|
-
for hour in (0, 4, 11):
|
120
|
-
dt1 = dt.replace(hour=hour, minute=10)
|
121
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(dt1)
|
122
|
-
assert minute is not None
|
123
|
-
timecode = minute.as_timecode().am
|
124
|
-
assert timecode
|
125
|
-
|
126
|
-
def test_roundtrip(self) -> None:
|
127
|
-
"""Test that a wide of minutes are correctly decoded by the state-based decoder"""
|
128
|
-
dt = datetime.datetime(1992, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)
|
129
|
-
delta = datetime.timedelta(minutes=915 if sys.implementation.name == "cpython" else 86400 - 915)
|
130
|
-
while dt.year < 1993:
|
131
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(dt)
|
132
|
-
assert minute is not None
|
133
|
-
timecode = minute.as_timecode().am
|
134
|
-
assert timecode
|
135
|
-
decoded_minute: wwvb.WWVBMinute | None = wwvb.WWVBMinuteIERS.from_timecode_am(minute.as_timecode())
|
136
|
-
assert decoded_minute
|
137
|
-
decoded = decoded_minute.as_timecode().am
|
138
|
-
self.assertEqual(
|
139
|
-
timecode,
|
140
|
-
decoded,
|
141
|
-
f"Checking equality of minute {minute}: [expected] {timecode} != [actual] {decoded}",
|
142
|
-
)
|
143
|
-
dt = dt + delta
|
144
|
-
|
145
|
-
def test_noise(self) -> None:
|
146
|
-
"""Test against pseudorandom noise"""
|
147
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(datetime.datetime(1992, 6, 30, 23, 50, tzinfo=datetime.timezone.utc))
|
148
|
-
r = random.Random(408)
|
149
|
-
junk = [
|
150
|
-
r.choice(
|
151
|
-
[
|
152
|
-
wwvb.AmplitudeModulation.MARK,
|
153
|
-
wwvb.AmplitudeModulation.ONE,
|
154
|
-
wwvb.AmplitudeModulation.ZERO,
|
155
|
-
],
|
156
|
-
)
|
157
|
-
for _ in range(480)
|
158
|
-
]
|
159
|
-
timecode = minute.as_timecode()
|
160
|
-
test_input = [*junk, wwvb.AmplitudeModulation.MARK, *timecode.am]
|
161
|
-
decoder = decode.wwvbreceive()
|
162
|
-
next(decoder)
|
163
|
-
for code in test_input[:-1]:
|
164
|
-
decoded = decoder.send(code)
|
165
|
-
self.assertIsNone(decoded)
|
166
|
-
decoded = decoder.send(wwvb.AmplitudeModulation.MARK)
|
167
|
-
assert decoded
|
168
|
-
self.assertIsNotNone(decoded)
|
169
|
-
self.assertEqual(
|
170
|
-
timecode.am[:60],
|
171
|
-
decoded.am,
|
172
|
-
f"Checking equality of minute {minute}: [expected] {timecode.am} != [actual] {decoded.am}",
|
173
|
-
)
|
174
|
-
|
175
|
-
def test_noise2(self) -> None:
|
176
|
-
"""Test of the full minute decoder with targeted errors to get full coverage"""
|
177
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(datetime.datetime(2012, 6, 30, 23, 50, tzinfo=datetime.timezone.utc))
|
178
|
-
timecode = minute.as_timecode()
|
179
|
-
decoded = wwvb.WWVBMinute.from_timecode_am(timecode)
|
180
|
-
self.assertIsNotNone(decoded)
|
181
|
-
for position in uwwvb.always_mark:
|
182
|
-
test_input = copy.deepcopy(timecode)
|
183
|
-
for noise in (0, 1):
|
184
|
-
test_input.am[position] = wwvb.AmplitudeModulation(noise)
|
185
|
-
decoded = wwvb.WWVBMinute.from_timecode_am(test_input)
|
186
|
-
self.assertIsNone(decoded)
|
187
|
-
for position in uwwvb.always_zero:
|
188
|
-
test_input = copy.deepcopy(timecode)
|
189
|
-
for noise in (1, 2):
|
190
|
-
test_input.am[position] = wwvb.AmplitudeModulation(noise)
|
191
|
-
decoded = wwvb.WWVBMinute.from_timecode_am(test_input)
|
192
|
-
self.assertIsNone(decoded)
|
193
|
-
for i in range(8):
|
194
|
-
if i in (0b101, 0b010): # Test the 6 impossible bit-combos
|
195
|
-
continue
|
196
|
-
test_input = copy.deepcopy(timecode)
|
197
|
-
test_input.am[36] = wwvb.AmplitudeModulation(i & 1)
|
198
|
-
test_input.am[37] = wwvb.AmplitudeModulation((i >> 1) & 1)
|
199
|
-
test_input.am[38] = wwvb.AmplitudeModulation((i >> 2) & 1)
|
200
|
-
decoded = wwvb.WWVBMinute.from_timecode_am(test_input)
|
201
|
-
self.assertIsNone(decoded)
|
202
|
-
# Invalid year-day
|
203
|
-
test_input = copy.deepcopy(timecode)
|
204
|
-
test_input.am[22] = wwvb.AmplitudeModulation(1)
|
205
|
-
test_input.am[23] = wwvb.AmplitudeModulation(1)
|
206
|
-
test_input.am[25] = wwvb.AmplitudeModulation(1)
|
207
|
-
decoded = wwvb.WWVBMinute.from_timecode_am(test_input)
|
208
|
-
self.assertIsNone(decoded)
|
209
|
-
|
210
|
-
def test_noise3(self) -> None:
|
211
|
-
"""Test impossible BCD values"""
|
212
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(datetime.datetime(2012, 6, 30, 23, 50, tzinfo=datetime.timezone.utc))
|
213
|
-
timecode = minute.as_timecode()
|
214
|
-
|
215
|
-
for poslist in [
|
216
|
-
[1, 2, 3, 4], # tens minutes
|
217
|
-
[5, 6, 7, 8], # ones minutes
|
218
|
-
[15, 16, 17, 18], # tens hours
|
219
|
-
[25, 26, 27, 28], # tens days
|
220
|
-
[30, 31, 32, 33], # ones days
|
221
|
-
[40, 41, 42, 43], # tens years
|
222
|
-
[45, 46, 47, 48], # ones years
|
223
|
-
[50, 51, 52, 53], # ones dut1
|
224
|
-
]:
|
225
|
-
with self.subTest(test=poslist):
|
226
|
-
test_input = copy.deepcopy(timecode)
|
227
|
-
for pi in poslist:
|
228
|
-
test_input.am[pi] = wwvb.AmplitudeModulation(1)
|
229
|
-
decoded = wwvb.WWVBMinute.from_timecode_am(test_input)
|
230
|
-
self.assertIsNone(decoded)
|
231
|
-
|
232
|
-
def test_previous_next_minute(self) -> None:
|
233
|
-
"""Test that previous minute and next minute are inverses"""
|
234
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(datetime.datetime(1992, 6, 30, 23, 50, tzinfo=datetime.timezone.utc))
|
235
|
-
self.assertEqual(minute, minute.next_minute().previous_minute())
|
236
|
-
|
237
|
-
def test_timecode_str(self) -> None:
|
238
|
-
"""Test the str() and repr() methods"""
|
239
|
-
minute = wwvb.WWVBMinuteIERS.from_datetime(datetime.datetime(1992, 6, 30, 23, 50, tzinfo=datetime.timezone.utc))
|
240
|
-
timecode = minute.as_timecode()
|
241
|
-
self.assertEqual(
|
242
|
-
str(timecode),
|
243
|
-
"₂₁⁰¹⁰₀⁰⁰₀²₀₀₁₀₀⁰₀¹¹₂₀⁰⁰¹₀₁⁰⁰₀₂₀⁰₁⁰₀₀⁰₁⁰²⁰¹¹₀⁰¹₀⁰¹²⁰⁰¹₀₀¹₁₁₁₂",
|
244
|
-
)
|
245
|
-
timecode.phase = [wwvb.PhaseModulation.UNSET] * 60
|
246
|
-
self.assertEqual(
|
247
|
-
repr(timecode),
|
248
|
-
"<WWVBTimecode 210100000200100001120001010002001000010201100100120010011112>",
|
249
|
-
)
|
250
|
-
|
251
|
-
def test_extreme_dut1(self) -> None:
|
252
|
-
"""Test extreme dut1 dates"""
|
253
|
-
s = iersdata.DUT1_DATA_START
|
254
|
-
sm1 = s - datetime.timedelta(days=1)
|
255
|
-
self.assertEqual(wwvb.get_dut1(s), wwvb.get_dut1(sm1))
|
256
|
-
|
257
|
-
e = iersdata.DUT1_DATA_START + datetime.timedelta(days=len(iersdata.DUT1_OFFSETS) - 1)
|
258
|
-
ep1 = e + datetime.timedelta(days=1)
|
259
|
-
|
260
|
-
self.assertEqual(wwvb.get_dut1(e), wwvb.get_dut1(ep1))
|
261
|
-
|
262
|
-
ep2 = datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=340)
|
263
|
-
wwvb.get_dut1(ep2)
|
264
|
-
|
265
|
-
def test_epoch(self) -> None:
|
266
|
-
"""Test the 1970-to-2069 epoch"""
|
267
|
-
m = wwvb.WWVBMinute(69, 1, 1, 0, 0)
|
268
|
-
n = wwvb.WWVBMinute(2069, 1, 1, 0, 0)
|
269
|
-
self.assertEqual(m, n)
|
270
|
-
|
271
|
-
m = wwvb.WWVBMinute(70, 1, 1, 0, 0)
|
272
|
-
n = wwvb.WWVBMinute(1970, 1, 1, 0, 0)
|
273
|
-
self.assertEqual(m, n)
|
274
|
-
|
275
|
-
def test_fromstring(self) -> None:
|
276
|
-
"""Test the fromstring() classmethod"""
|
277
|
-
s = "WWVB timecode: year=1998 days=365 hour=23 min=56 dst=0 ut1=-300 ly=0 ls=1"
|
278
|
-
t = "year=1998 days=365 hour=23 min=56 dst=0 ut1=-300 ly=0 ls=1"
|
279
|
-
self.assertEqual(wwvb.WWVBMinuteIERS.fromstring(s), wwvb.WWVBMinuteIERS.fromstring(t))
|
280
|
-
t = "year=1998 days=365 hour=23 min=56 dst=0 ut1=-300 ls=1"
|
281
|
-
self.assertEqual(wwvb.WWVBMinuteIERS.fromstring(s), wwvb.WWVBMinuteIERS.fromstring(t))
|
282
|
-
t = "year=1998 days=365 hour=23 min=56 dst=0"
|
283
|
-
self.assertEqual(wwvb.WWVBMinuteIERS.fromstring(s), wwvb.WWVBMinuteIERS.fromstring(t))
|
284
|
-
|
285
|
-
def test_from_datetime(self) -> None:
|
286
|
-
"""Test the from_datetime() classmethod"""
|
287
|
-
d = datetime.datetime(1998, 12, 31, 23, 56, 0, tzinfo=datetime.timezone.utc)
|
288
|
-
self.assertEqual(
|
289
|
-
wwvb.WWVBMinuteIERS.from_datetime(d),
|
290
|
-
wwvb.WWVBMinuteIERS.from_datetime(d, newls=True, newut1=-300),
|
291
|
-
)
|
292
|
-
|
293
|
-
def test_exceptions(self) -> None:
|
294
|
-
"""Test some error detection"""
|
295
|
-
with self.assertRaises(ValueError):
|
296
|
-
wwvb.WWVBMinute(2021, 1, 1, 1, dst=4)
|
297
|
-
|
298
|
-
with self.assertRaises(ValueError):
|
299
|
-
wwvb.WWVBMinute(2021, 1, 1, 1, ut1=1)
|
300
|
-
|
301
|
-
with self.assertRaises(ValueError):
|
302
|
-
wwvb.WWVBMinute(2021, 1, 1, 1, ls=False)
|
303
|
-
|
304
|
-
with self.assertRaises(ValueError):
|
305
|
-
wwvb.WWVBMinute.fromstring("year=1998 days=365 hour=23 min=56 dst=0 ut1=-300 ly=0 ls=1 boo=1")
|
306
|
-
|
307
|
-
def test_update(self) -> None:
|
308
|
-
"""Ensure that the 'maybe_warn_update' function is covered"""
|
309
|
-
with self.assertWarnsRegex(Warning, "updateiers"):
|
310
|
-
wwvb._maybe_warn_update(datetime.date(1970, 1, 1))
|
311
|
-
wwvb._maybe_warn_update(datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc))
|
312
|
-
|
313
|
-
def test_undefined(self) -> None:
|
314
|
-
"""Ensure that the check for unset elements in am works"""
|
315
|
-
with self.assertWarnsRegex(Warning, "is unset"):
|
316
|
-
str(wwvb.WWVBTimecode(60))
|
317
|
-
|
318
|
-
def test_tz(self) -> None:
|
319
|
-
"""Get a little more coverage in the dst change functions"""
|
320
|
-
date, row = wwvb._get_dst_change_date_and_row(datetime.datetime(1960, 1, 1, tzinfo=datetime.timezone.utc))
|
321
|
-
self.assertIsNone(date)
|
322
|
-
self.assertIsNone(row)
|
323
|
-
|
324
|
-
self.assertIsNone(wwvb._get_dst_change_hour(datetime.datetime(1960, 1, 1, tzinfo=datetime.timezone.utc)))
|
325
|
-
|
326
|
-
self.assertEqual(wwvb._get_dst_next(datetime.datetime(1960, 1, 1, tzinfo=datetime.timezone.utc)), 0b000111)
|
327
|
-
|
328
|
-
# Cuba followed year-round DST for several years
|
329
|
-
self.assertEqual(
|
330
|
-
wwvb._get_dst_next(datetime.datetime(2005, 1, 1, tzinfo=datetime.timezone.utc), tz=tz.ZoneInfo("Cuba")),
|
331
|
-
0b101111,
|
332
|
-
)
|
333
|
-
date, row = wwvb._get_dst_change_date_and_row(
|
334
|
-
datetime.datetime(2005, 1, 1, tzinfo=datetime.timezone.utc),
|
335
|
-
tz=tz.ZoneInfo("Cuba"),
|
336
|
-
)
|
337
|
-
self.assertIsNone(date)
|
338
|
-
self.assertIsNone(row)
|
339
|
-
|
340
|
-
# California was weird in 1948
|
341
|
-
self.assertEqual(
|
342
|
-
wwvb._get_dst_next(
|
343
|
-
datetime.datetime(1948, 1, 1, tzinfo=datetime.timezone.utc),
|
344
|
-
tz=tz.ZoneInfo("America/Los_Angeles"),
|
345
|
-
),
|
346
|
-
0b100011,
|
347
|
-
)
|
348
|
-
|
349
|
-
# Berlin had DST changes on Monday in 1917
|
350
|
-
self.assertEqual(
|
351
|
-
wwvb._get_dst_next(
|
352
|
-
datetime.datetime(1917, 1, 1, tzinfo=datetime.timezone.utc),
|
353
|
-
tz=tz.ZoneInfo("Europe/Berlin"),
|
354
|
-
),
|
355
|
-
0b100011,
|
356
|
-
)
|
357
|
-
|
358
|
-
#
|
359
|
-
# Australia observes DST in the other half of the year compared to the
|
360
|
-
# Northern hemisphere
|
361
|
-
self.assertEqual(
|
362
|
-
wwvb._get_dst_next(
|
363
|
-
datetime.datetime(2005, 1, 1, tzinfo=datetime.timezone.utc),
|
364
|
-
tz=tz.ZoneInfo("Australia/Melbourne"),
|
365
|
-
),
|
366
|
-
0b100011,
|
367
|
-
)
|
368
|
-
|
369
|
-
def test_epoch2(self) -> None:
|
370
|
-
"""Test that the settable epoch feature works"""
|
371
|
-
self.assertEqual(wwvb.WWVBMinute(0, 1, 1, 0, 0).year, 2000)
|
372
|
-
self.assertEqual(wwvb.WWVBMinute(69, 1, 1, 0, 0).year, 2069)
|
373
|
-
self.assertEqual(wwvb.WWVBMinute(70, 1, 1, 0, 0).year, 1970)
|
374
|
-
self.assertEqual(wwvb.WWVBMinute(99, 1, 1, 0, 0).year, 1999)
|
375
|
-
|
376
|
-
# 4-digit years can always be used
|
377
|
-
self.assertEqual(wwvb.WWVBMinute(2000, 1, 1, 0, 0).year, 2000)
|
378
|
-
self.assertEqual(wwvb.WWVBMinute(2069, 1, 1, 0, 0).year, 2069)
|
379
|
-
self.assertEqual(wwvb.WWVBMinute(1970, 1, 1, 0, 0).year, 1970)
|
380
|
-
self.assertEqual(wwvb.WWVBMinute(1999, 1, 1, 0, 0).year, 1999)
|
381
|
-
|
382
|
-
self.assertEqual(wwvb.WWVBMinute(1900, 1, 1, 0, 0).year, 1900)
|
383
|
-
self.assertEqual(wwvb.WWVBMinute(1969, 1, 1, 0, 0).year, 1969)
|
384
|
-
self.assertEqual(wwvb.WWVBMinute(2070, 1, 1, 0, 0).year, 2070)
|
385
|
-
self.assertEqual(wwvb.WWVBMinute(2099, 1, 1, 0, 0).year, 2099)
|
386
|
-
|
387
|
-
self.assertEqual(WWVBMinute2k(0, 1, 1, 0, 0).year, 2000)
|
388
|
-
self.assertEqual(WWVBMinute2k(99, 1, 1, 0, 0).year, 2099)
|
389
|
-
|
390
|
-
# 4-digit years can always be used
|
391
|
-
self.assertEqual(WWVBMinute2k(2000, 1, 1, 0, 0).year, 2000)
|
392
|
-
self.assertEqual(WWVBMinute2k(2069, 1, 1, 0, 0).year, 2069)
|
393
|
-
self.assertEqual(WWVBMinute2k(1970, 1, 1, 0, 0).year, 1970)
|
394
|
-
self.assertEqual(WWVBMinute2k(1999, 1, 1, 0, 0).year, 1999)
|
395
|
-
|
396
|
-
self.assertEqual(WWVBMinute2k(1900, 1, 1, 0, 0).year, 1900)
|
397
|
-
self.assertEqual(WWVBMinute2k(1969, 1, 1, 0, 0).year, 1969)
|
398
|
-
self.assertEqual(WWVBMinute2k(2070, 1, 1, 0, 0).year, 2070)
|
399
|
-
self.assertEqual(WWVBMinute2k(2099, 1, 1, 0, 0).year, 2099)
|
400
|
-
|
401
|
-
|
402
|
-
if __name__ == "__main__": # pragma no cover
|
403
|
-
unittest.main()
|
wwvb-4.0.0a0.dist-info/RECORD
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
uwwvb.py,sha256=Ocys0AK10NocugDxNjIjUkL3_uVqD2Q6c2WLfqXmx1s,5732
|
2
|
-
wwvb/__init__.py,sha256=gSeXqukkcHnYCJAkbXk4eWBMqBu7n3GJ7CJM32XMiaU,30770
|
3
|
-
wwvb/__version__.py,sha256=vsEaiHcm9DvHyRWD600KxOTf-j-TilwuyCMsi2Ba3dE,413
|
4
|
-
wwvb/decode.py,sha256=d7bAG2pVsFMX0uxY6pMaz-psdbLXauSHh55JDaUT6W4,2713
|
5
|
-
wwvb/dut1table.py,sha256=uqaCnCOWr7ytx-nt3mmyhFb9jJVNP5N-WJX-glunKAk,890
|
6
|
-
wwvb/gen.py,sha256=0hgicarLgCtOgBgIpb9sU08yzKgCGuwIYOqblR34H5I,3791
|
7
|
-
wwvb/iersdata.py,sha256=NOItawXnXwd3Gq3K_cx85NVQ_iogLw3MDgzOI8q_75Y,924
|
8
|
-
wwvb/iersdata_dist.py,sha256=zQVO2AjiBTrhpSs21HUG9fL4S11K3WzTk0kP_eyMXz4,2364
|
9
|
-
wwvb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
wwvb/testcli.py,sha256=wa1E9iRaE62OBHshR4K_hxhIzSNxwpWy8rgoEKuhrqs,10168
|
11
|
-
wwvb/testdaylight.py,sha256=JW8UJK-FeAg9Kjy5F_aBYbUVj44DKpJOXQ-u9ooyprA,2485
|
12
|
-
wwvb/testls.py,sha256=Kz4-MWLaUKABwyql8sWdzvtg8gipxhHv4r-6fn3fptg,1720
|
13
|
-
wwvb/testpm.py,sha256=JR3V_EIm0Su3c4m5CcKpMANL3aZnpzEzDL3KhgKX3rM,905
|
14
|
-
wwvb/testuwwvb.py,sha256=SMvq85tJgjGMYHKsreCtlM4Wrb3MYOOjf5rKf9wuHYc,9176
|
15
|
-
wwvb/testwwvb.py,sha256=t0TUJhHOh-mRFD-GUvePzHs7D3DkNb_paRAI1uYH8l8,16807
|
16
|
-
wwvb/tz.py,sha256=XVYh0btrnyP_nUiZUwBjufkYbb26_DTiZVl-R_1BA2A,299
|
17
|
-
wwvb/updateiers.py,sha256=3Bg0cpQnTDrGWcHbi0rwZ4rSURJcO64Bds9FDTYLSK8,7382
|
18
|
-
wwvb/wwvbtk.py,sha256=WumGtKsAxMw1HMTfm5x4dOKmHikCaDBRZfh_WbF4iu0,4585
|
19
|
-
wwvb-4.0.0a0.dist-info/METADATA,sha256=lLqzL4USvZY6Md_rAg-k7OhzY2ySNPHjSWgTKwF8qG4,10292
|
20
|
-
wwvb-4.0.0a0.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
21
|
-
wwvb-4.0.0a0.dist-info/entry_points.txt,sha256=KSevvHWLEKxOxUQ-L-OQidD4Sj2BPEfhZ2TQhOgyys4,179
|
22
|
-
wwvb-4.0.0a0.dist-info/top_level.txt,sha256=0IYdkhEAMgurpv_F-76rlyn4GdxepGFzG99tivVdQVU,11
|
23
|
-
wwvb-4.0.0a0.dist-info/RECORD,,
|
File without changes
|
File without changes
|