Relax transfer size requirement in test (#2261592)

This commit is contained in:
Florian Weimer 2024-02-01 12:29:36 +01:00
parent 34fbbf57f8
commit ad4ac9856b
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,24 @@
Submitted upstream: <https://github.com/libgit2/pygit2/pull/1275>
diff --git a/test/test_remote.py b/test/test_remote.py
index fd12c71107261bf9..d268019921369e99 100644
--- a/test/test_remote.py
+++ b/test/test_remote.py
@@ -39,7 +39,6 @@ REMOTE_URL = 'https://github.com/libgit2/pygit2.git'
REMOTE_FETCHSPEC_SRC = 'refs/heads/*'
REMOTE_FETCHSPEC_DST = 'refs/remotes/origin/*'
REMOTE_REPO_OBJECTS = 30
-REMOTE_REPO_BYTES = 2758
REMOTE_FETCHTEST_FETCHSPECS = ["refs/tags/v1.13.2"]
REMOTE_REPO_FETCH_ALL_OBJECTS = 13276
REMOTE_REPO_FETCH_HEAD_COMMIT_OBJECTS = 238
@@ -215,7 +214,8 @@ def test_remote_refcount(testrepo):
def test_fetch(emptyrepo):
remote = emptyrepo.remotes[0]
stats = remote.fetch()
- assert stats.received_bytes == REMOTE_REPO_BYTES
+ assert stats.received_bytes > 2700
+ assert stats.received_bytes < 2800
assert stats.indexed_objects == REMOTE_REPO_OBJECTS
assert stats.received_objects == REMOTE_REPO_OBJECTS

View File

@ -8,6 +8,7 @@ Summary: Python bindings for libgit2
License: GPL-2.0-only WITH GCC-exception-2.0
URL: https://www.pygit2.org/
Source0: https://github.com/libgit2/pygit2/archive/v%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz
Patch0: python-pygit2-transfer-size.patch
# This patch lowers the Python-level dependency on cffi. Fedora package python-cffi-1.15.1-5 and
# higher contain the patches needed for Python >= 3.12.
# Remove when cffi >= 1.16.0 is available on all releases with Python 3.12.