Skip to content

Commit 4e6204a

Browse files
committed
Make arkg tests skippable
1 parent a6ab8c8 commit 4e6204a

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ jobs:
3434
python-version: ${{ matrix.python }}
3535
architecture: ${{ matrix.architecture }}
3636

37+
- name: Install system dependencies
38+
if: "startsWith(matrix.os, 'ubuntu')"
39+
run: sudo apt-get install -qq libpcsclite-dev
40+
3741
- name: Install python dependencies
3842
run: |
3943
python -m pip install --upgrade pip setuptools poetry
40-
poetry update
44+
poetry install --all-extras
4145
4246
- name: Run pre-commit
4347
if: "!startsWith(matrix.python, 'pypy')"
@@ -86,9 +90,10 @@ jobs:
8690

8791
- name: Install python dependencies
8892
run: |
93+
sudo apt-get install -qq libpcsclite-dev
8994
python -m pip install --upgrade pip
9095
python -m pip install poetry
91-
poetry install
96+
poetry install --all-extras
9297
9398
- name: Build sphinx documentation
9499
run: poetry run make -C docs/ html

tests/test_arkg.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# flake8: noqa ignore lines too long
2-
from fido2.arkg import ARKG_P256
2+
33

44
import pytest
55

66

7+
@pytest.fixture(autouse=True, scope="module")
8+
def preconditions():
9+
global ARKG_P256
10+
try:
11+
from fido2.arkg import ARKG_P256
12+
except ImportError:
13+
pytest.skip("ecdsa is not installed")
14+
15+
716
TEST_VECTORS = [
817
{
918
"ctx": b"ARKG-P256.test vectors",

0 commit comments

Comments
 (0)