Skip to content

Commit e0baecf

Browse files
committed
Relax transfer bytes check in test_remote.test_fetch
On Fedora 40, this test fails with: __________________________________ test_fetch __________________________________ emptyrepo = pygit2.Repository('/tmp/pytest-of-mockbuild/pytest-0/test_fetch0/emp tyrepo/.git/') def test_fetch(emptyrepo): remote = emptyrepo.remotes[0] stats = remote.fetch() > assert stats.received_bytes == REMOTE_REPO_BYTES E assert 2760 == 2758 E + where 2760 = <pygit2.remote.TransferProgress object at 0xf60a7db0>.received_bytes test/test_remote.py:218: AssertionError Probably due to zlib-ng/zlib differences.
1 parent c03d90c commit e0baecf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_remote.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
REMOTE_FETCHSPEC_SRC = 'refs/heads/*'
4040
REMOTE_FETCHSPEC_DST = 'refs/remotes/origin/*'
4141
REMOTE_REPO_OBJECTS = 30
42-
REMOTE_REPO_BYTES = 2758
4342
REMOTE_FETCHTEST_FETCHSPECS = ["refs/tags/v1.13.2"]
4443
REMOTE_REPO_FETCH_ALL_OBJECTS = 13276
4544
REMOTE_REPO_FETCH_HEAD_COMMIT_OBJECTS = 238
@@ -215,7 +214,8 @@ def test_remote_refcount(testrepo):
215214
def test_fetch(emptyrepo):
216215
remote = emptyrepo.remotes[0]
217216
stats = remote.fetch()
218-
assert stats.received_bytes == REMOTE_REPO_BYTES
217+
assert stats.received_bytes > 2700
218+
assert stats.received_bytes < 2800
219219
assert stats.indexed_objects == REMOTE_REPO_OBJECTS
220220
assert stats.received_objects == REMOTE_REPO_OBJECTS
221221

0 commit comments

Comments
 (0)