python/time-machine: update to 2.14.0
| | |
| | | include ../../../make-rules/shared-macros.mk |
| | | |
| | | COMPONENT_NAME = time-machine |
| | | HUMAN_VERSION = 2.13.0 |
| | | HUMAN_VERSION = 2.14.0 |
| | | COMPONENT_SUMMARY = time-machine - Travel through time in your tests. |
| | | COMPONENT_PROJECT_URL = https://github.com/adamchainz/time-machine |
| | | COMPONENT_ARCHIVE_URL = \ |
| | | https://github.com/adamchainz/time-machine/archive/refs/tags/$(HUMAN_VERSION).tar.gz |
| | | COMPONENT_ARCHIVE_HASH = \ |
| | | sha256:a0892ada963bd16fdaf657d71ef9bec614931c467a935f3217bf08906fe3bd11 |
| | | sha256:96d4d0d9af39004f74b705650bd5079c9208ba2c94428621863982e914ed0884 |
| | | COMPONENT_LICENSE = MIT |
| | | COMPONENT_LICENSE_FILE = LICENSE |
| | | |
| | |
| | | TEST_REQUIRED_PACKAGES.python += library/python/pytest |
| | | TEST_REQUIRED_PACKAGES.python += library/python/pytest-randomly |
| | | TEST_REQUIRED_PACKAGES.python += library/python/python-dateutil |
| | | TEST_REQUIRED_PACKAGES.python += library/python/tomli |
| | |
| | | library/python/time-machine-37@2.9.0,5.11-2023.0.0.1 noincorporate |
| | | library/python/time-machine-37@2.9.0,5.11-2023.0.0.2 |
| | |
| | | # |
| | | |
| | | # |
| | | # Copyright 2023 <contributor> |
| | | # Copyright 2024 <contributor> |
| | | # |
| | | |
| | | set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) |
| | |
| | | |
| | | license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)' |
| | | |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.so |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.cpython-$(PYV).so |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/LICENSE |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/METADATA |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/WHEEL |
| | |
| | | --- time-machine-2.10.0/tests/test_time_machine.py.orig |
| | | +++ time-machine-2.10.0/tests/test_time_machine.py |
| | | @@ -334,6 +334,7 @@ |
| | | --- time-machine-2.14.0/tests/test_time_machine.py.orig |
| | | +++ time-machine-2.14.0/tests/test_time_machine.py |
| | | @@ -380,6 +380,7 @@ |
| | | assert time.time() == EPOCH + 21600.0 |
| | | |
| | | |
| | |
| | | def test_destination_datetime_tzinfo_zoneinfo(): |
| | | orig_timezone = time.timezone |
| | | orig_altzone = time.altzone |
| | | @@ -367,6 +368,7 @@ |
| | | @@ -413,6 +414,7 @@ |
| | | assert time.daylight == orig_daylight |
| | | |
| | | |
| | |
| | | def test_destination_datetime_tzinfo_zoneinfo_nested(): |
| | | orig_tzname = time.tzname |
| | | |
| | | @@ -383,6 +385,7 @@ |
| | | @@ -429,6 +431,7 @@ |
| | | assert time.tzname == orig_tzname |
| | | |
| | | |
| | | +@pytest.mark.skip(reason="always fails: https://github.com/adamchainz/time-machine/issues/386") |
| | | def test_destination_datetime_tzinfo_zoneinfo_no_orig_tz(): |
| | | orig_tz = os.environ["TZ"] |
| | | del os.environ["TZ"] |
| | | @@ -599,6 +602,7 @@ |
| | | with change_local_timezone(None): |
| | | orig_tzname = time.tzname |
| | | @@ -698,6 +701,7 @@ |
| | | assert time.time() == EPOCH |
| | | |
| | | |
| | |
| | | --- time-machine-2.12.0/tox.ini.orig |
| | | +++ time-machine-2.12.0/tox.ini |
| | | --- time-machine-2.14.0/tox.ini.orig |
| | | +++ time-machine-2.14.0/tox.ini |
| | | @@ -7,7 +7,7 @@ |
| | | [testenv] |
| | | package = wheel |
| | |
| | | "system/library" |
| | | ], |
| | | "fmris": [ |
| | | "library/python/time-machine-39", |
| | | "library/python/time-machine" |
| | | "library/python/time-machine", |
| | | "library/python/time-machine-39" |
| | | ], |
| | | "name": "time-machine" |
| | | } |
| | | } |
| | |
| | | py$(PYV): remove tox env folder $(@D)/.tox/py$(PYV) |
| | | py$(PYV): commands[0]> python -W error::ResourceWarning -W error::DeprecationWarning -W error::PendingDeprecationWarning -W ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning -W ignore:datetime.datetime.utcnow:DeprecationWarning -m coverage run -m pytest tests |
| | | $(PYTHON_DIR)/vendor-packages/pytest_ignore_flaky.py:13: PytestDeprecationWarning: The hookimpl PluginIgnoreFlaky.pytest_runtest_makereport uses old-style configuration options (marks or attributes). |
| | | Please use the pytest.hookimpl(hookwrapper=True) decorator instead |
| | | to configure the hooks. |
| | | See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers |
| | | @pytest.mark.hookwrapper |
| | | ============================= test session starts ============================== |
| | | platform sunos5 -- Python $(PYTHON_VERSION).X -- $(@D)/.tox/py$(PYV)/bin/python |
| | | cachedir: .tox/py$(PYV)/.pytest_cache |
| | | rootdir: $(@D) |
| | | configfile: pyproject.toml |
| | | collecting ... collected 96 items |
| | | collecting ... collected 97 items |
| | | |
| | | tests/test_time_machine.py::ClassDecoratorInheritanceTests::test_ineheritance_correctly_rebound PASSED |
| | | tests/test_time_machine.py::TestEscapeHatch::test_datetime_now PASSED |
| | | tests/test_time_machine.py::TestEscapeHatch::test_datetime_now_tz PASSED |
| | | tests/test_time_machine.py::TestEscapeHatch::test_datetime_utcnow PASSED |
| | |
| | | tests/test_time_machine.py::test_unsupported_type PASSED |
| | | tests/test_time_machine.py::test_uuid1 PASSED |
| | | |
| | | ======== 91 passed, 5 skipped ======== |
| | | ======== 92 passed, 5 skipped ======== |
| | | $(PYTHON_DIR)/vendor-packages/coverage/inorout.py:503: CoverageWarning: Module src/_time_machine.c was never imported. (module-not-imported) |
| | | self.warn(f"Module {pkg} was never imported.", slug="module-not-imported") |
| | | py$(PYV): OK |
| | | congratulations :) |
| | |
| | | |
| | | license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)' |
| | | |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.so |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.cpython-$(PYV).so |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/LICENSE |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/METADATA |
| | | file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/WHEEL |