diff options
author | Matoro Mahri <matoro_gentoo@matoro.tk> | 2023-11-06 16:22:47 -0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-11-07 20:33:58 +0000 |
commit | 930c475d8ab0820f3808e02275ba630caf9a414c (patch) | |
tree | fb78c59950e3f573f1662a9632056825665facc2 | |
parent | dev-python/pyzmq: skip test_large_send (diff) | |
download | gentoo-930c475d8ab0820f3808e02275ba630caf9a414c.tar.gz gentoo-930c475d8ab0820f3808e02275ba630caf9a414c.tar.bz2 gentoo-930c475d8ab0820f3808e02275ba630caf9a414c.zip |
dev-python/executing: add patch for new slow tests
The original skips are technically for tests that take a long time to
run, which these aren't really - they just fail if run under a
sufficiently slow CPU since they are measuring a hard real-time
benchmark. Already accepted upstream.
See: https://github.com/alexmojaki/executing/pull/78
Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | dev-python/executing/executing-2.0.1.ebuild | 2 | ||||
-rw-r--r-- | dev-python/executing/files/executing-2.0.1-additional-slow-tests.patch | 38 |
2 files changed, 40 insertions, 0 deletions
diff --git a/dev-python/executing/executing-2.0.1.ebuild b/dev-python/executing/executing-2.0.1.ebuild index a5e4ed0cc8c8..3e29d488d602 100644 --- a/dev-python/executing/executing-2.0.1.ebuild +++ b/dev-python/executing/executing-2.0.1.ebuild @@ -32,6 +32,8 @@ BDEPEND=" ) " +PATCHES=( "${FILESDIR}/${PN}-2.0.1-additional-slow-tests.patch" ) + distutils_enable_tests pytest export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} diff --git a/dev-python/executing/files/executing-2.0.1-additional-slow-tests.patch b/dev-python/executing/files/executing-2.0.1-additional-slow-tests.patch new file mode 100644 index 000000000000..36346e7363fb --- /dev/null +++ b/dev-python/executing/files/executing-2.0.1-additional-slow-tests.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/show_bug.cgi?id=909738 +https://github.com/alexmojaki/executing/pull/78 + +From 9990d20a28d46e8a911c370a019f9231cad977f0 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Sun, 5 Nov 2023 19:54:34 -0500 +Subject: [PATCH] Add many_calls tests to EXECUTING_SLOW_TESTS + +--- + tests/test_main.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/tests/test_main.py b/tests/test_main.py +index 7e33247..bc015cd 100644 +--- a/tests/test_main.py ++++ b/tests/test_main.py +@@ -279,6 +279,10 @@ def test_future_import(self): + print(1 / 2) + tester(4) + ++ @pytest.mark.skipif( ++ not os.getenv("EXECUTING_SLOW_TESTS"), ++ reason="These tests are very slow, enable them explicitly", ++ ) + def test_many_calls(self): + node = None + start = time.time() +@@ -290,6 +294,10 @@ def test_many_calls(self): + self.assertIs(node, new_node) + self.assertLess(time.time() - start, 1) + ++ @pytest.mark.skipif( ++ not os.getenv("EXECUTING_SLOW_TESTS"), ++ reason="These tests are very slow, enable them explicitly", ++ ) + def test_many_source_for_filename_calls(self): + source = None + start = time.time() |