From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/parso/, dev-python/parso/files/
Date: Thu, 5 Aug 2021 07:29:13 +0000 (UTC) [thread overview]
Message-ID: <1628148546.43721251f27a53bd680dd43ed8e08745f7fa1d05.mgorny@gentoo> (raw)
commit: 43721251f27a53bd680dd43ed8e08745f7fa1d05
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 5 06:45:33 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug 5 07:29:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43721251
dev-python/parso: Backport flaky test fix
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../parso/files/parso-0.8.2-flaky-test.patch | 23 ++++++++++++++++++++++
dev-python/parso/parso-0.8.2.ebuild | 1 +
2 files changed, 24 insertions(+)
diff --git a/dev-python/parso/files/parso-0.8.2-flaky-test.patch b/dev-python/parso/files/parso-0.8.2-flaky-test.patch
new file mode 100644
index 00000000000..729ec409c82
--- /dev/null
+++ b/dev-python/parso/files/parso-0.8.2-flaky-test.patch
@@ -0,0 +1,23 @@
+From 60fed7b9f80cbb3d9cb7a9e42ad8c0f3c513801d Mon Sep 17 00:00:00 2001
+From: Saiyang Gou <gousaiyang@163.com>
+Date: Sat, 29 May 2021 18:17:24 -0700
+Subject: [PATCH] Fix flaky test_cache_last_used_update again (#189)
+
+This is a follow up for #177. On Windows, `assert node_cache_item.last_used < now` may fail as the two time values can be equal.
+---
+ test/test_cache.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test_cache.py b/test/test_cache.py
+index f4291c2..5e633fc 100644
+--- a/test/test_cache.py
++++ b/test/test_cache.py
+@@ -137,7 +137,7 @@ def test_cache_last_used_update(diff_cache, use_file_io):
+ parse('somecode', cache=True, path=p)
+ node_cache_item = next(iter(parser_cache.values()))[p]
+ now = time.time()
+- assert node_cache_item.last_used < now
++ assert node_cache_item.last_used <= now
+
+ if use_file_io:
+ f = _FixedTimeFileIO(p, 'code', node_cache_item.last_used - 10)
diff --git a/dev-python/parso/parso-0.8.2.ebuild b/dev-python/parso/parso-0.8.2.ebuild
index 37196d2c7c2..2637f5cf5c3 100644
--- a/dev-python/parso/parso-0.8.2.ebuild
+++ b/dev-python/parso/parso-0.8.2.ebuild
@@ -20,6 +20,7 @@ distutils_enable_tests pytest
PATCHES=(
"${FILESDIR}"/${P}-py310.patch
+ "${FILESDIR}"/${P}-flaky-test.patch
)
python_test() {
next reply other threads:[~2021-08-05 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 7:29 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-08-24 23:21 [gentoo-commits] repo/gentoo:master commit in: dev-python/parso/, dev-python/parso/files/ Sam James
2021-08-05 7:29 Michał Górny
2021-06-30 12:21 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1628148546.43721251f27a53bd680dd43ed8e08745f7fa1d05.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox