Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavid committed Mar 21, 2024
1 parent 6d539d7 commit 3eba911
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/blob.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <git2.h>
#include <git2/sys/errors.h>
#include "diff.h"
#include "error.h"
#include "object.h"
Expand Down
1 change: 1 addition & 0 deletions src/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <git2.h>
#include <git2/sys/errors.h>
#include <git2/sys/filter.h>
#include "diff.h"
#include "error.h"
Expand Down
11 changes: 6 additions & 5 deletions test/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"""Tests for credentials"""

from pathlib import Path
import platform

import pytest

Expand Down Expand Up @@ -169,11 +170,11 @@ def certificate_check(testrepo, certificate, valid, host):
remote.fetch(callbacks=MyCallbacks())

# libgit2 uses different error message for Linux and Windows
# TODO test one or the other depending on the platform
assert str(exc.value) in (
'user rejected certificate for github.com', # httpclient
'user cancelled certificate check',
) # winhttp
value = str(exc.value)
if platform.system() == 'Windows':
assert value == 'user cancelled certificate check' # winhttp
else:
assert value == 'user rejected certificate for github.com' # httpclient

# TODO Add GitError.error_code
# assert exc.value.error_code == pygit2.GIT_ERROR_HTTP
Expand Down

0 comments on commit 3eba911

Please sign in to comment.