* leapseconddata.tai is a timezone object. BEWARE, because of reasons, it compares equal to datetime.datetime.utc! * tai_offset can take either kind of timestamp * to_tai, tai_to_utc: convert to/from the TAI timescale. * is_leap_second: return True if the given second is a leap second. In the UTC timescale, the ":59" second returns True even though "only" the second repetition of :59 is a leap second
19 lines
474 B
Makefile
19 lines
474 B
Makefile
PYTHON ?= python3
|
|
|
|
.PHONY: all
|
|
all: coverage mypy
|
|
|
|
COVERAGE_INCLUDE=--omit '/usr/**/*.py'
|
|
.PHONY: coverage
|
|
coverage:
|
|
$(PYTHON) -mcoverage run --branch -m unittest testleapseconddata.py
|
|
$(PYTHON) -mcoverage html $(COVERAGE_INCLUDE)
|
|
$(PYTHON) -mcoverage report $(COVERAGE_INCLUDE) --fail-under=100
|
|
|
|
.PHONY: mypy
|
|
mypy:
|
|
mypy --strict *.py
|
|
# Copyright (C) 2021 Jeff Epler <jepler@gmail.com>
|
|
# SPDX-FileCopyrightText: 2021 Jeff Epler
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-only
|