summaryrefslogtreecommitdiff
path: root/dev-python/time-machine/time-machine-3.5.1.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/time-machine/time-machine-3.5.1.ebuild')
-rw-r--r--dev-python/time-machine/time-machine-3.5.1.ebuild20
1 files changed, 18 insertions, 2 deletions
diff --git a/dev-python/time-machine/time-machine-3.5.1.ebuild b/dev-python/time-machine/time-machine-3.5.1.ebuild
index 11af38908765..83acf3506841 100644
--- a/dev-python/time-machine/time-machine-3.5.1.ebuild
+++ b/dev-python/time-machine/time-machine-3.5.1.ebuild
@@ -7,7 +7,7 @@ DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{13..14} )
-inherit distutils-r1
+inherit distutils-r1 toolchain-funcs
DESCRIPTION="Travel through time in your tests"
HOMEPAGE="
@@ -21,7 +21,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
BDEPEND="
test? (
@@ -34,3 +34,19 @@ BDEPEND="
EPYTEST_PLUGIN_LOAD_VIA_ENV=1
EPYTEST_PLUGINS=( "${PN}" hypothesis )
distutils_enable_tests pytest
+
+src_test() {
+ local EPYTEST_DESELECT=()
+
+ if ! tc-has-64bit-time_t; then
+ EPYTEST_DESELECT+=(
+ tests/test_fuzz.py::test_travel_to_aware_datetime
+ tests/test_fuzz.py::TestTravelMachine::runTest
+ tests/test_time_machine.py::test_datetime_today_exact_far_future
+ tests/test_time_machine.py::test_datetime_today_subclass_exact_far_future
+ tests/test_time_machine.py::test_date_today_exact_far_future
+ )
+ fi
+
+ distutils-r1_src_test
+}