Skip to content

Commit 9699425

Browse files
committed
Deselect tests requiring LHAPDF to run
1 parent c7f55df commit 9699425

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ nnu = "nnusf.cli:command"
6666

6767
[tool.poe.tasks]
6868
coverage = "$BROWSER htmlcov/index.html"
69-
test = "pytest tests"
69+
test = "pytest -m 'not lhapdf'"
7070
test-cov = ["test", "coverage"]
7171
lint = "pylint src/**/*.py -E"
7272
lint-warnings = "pylint src/**/*.py --exit-zero"
@@ -76,6 +76,7 @@ testpaths = ['tests/']
7676
python_files = ['test_*.py', 'benchmark_*.py', 'regression.py']
7777
python_classes = ['Test*']
7878
python_functions = ['test_*']
79+
markers = ["lhapdf: tests that require LHAPDF, and possibly PDF sets"]
7980
addopts = [
8081
'--cov=nnusf',
8182
'--cov-report=html',

tests/theory/test_bodek_yang.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# -*- coding: utf-8 -*-
2-
from nnusf.theory.bodek_yang import cuts
2+
import pytest
33

44

5+
@pytest.mark.lhapdf
56
def test_upper_cut():
7+
from nnusf.theory.bodek_yang import cuts
8+
69
assert cuts.Q2MAX > 1.0

0 commit comments

Comments
 (0)