Skip to content

Commit

Permalink
Deselect tests requiring LHAPDF to run
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Feb 20, 2023
1 parent c7f55df commit 9699425
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ nnu = "nnusf.cli:command"

[tool.poe.tasks]
coverage = "$BROWSER htmlcov/index.html"
test = "pytest tests"
test = "pytest -m 'not lhapdf'"
test-cov = ["test", "coverage"]
lint = "pylint src/**/*.py -E"
lint-warnings = "pylint src/**/*.py --exit-zero"
Expand All @@ -76,6 +76,7 @@ testpaths = ['tests/']
python_files = ['test_*.py', 'benchmark_*.py', 'regression.py']
python_classes = ['Test*']
python_functions = ['test_*']
markers = ["lhapdf: tests that require LHAPDF, and possibly PDF sets"]
addopts = [
'--cov=nnusf',
'--cov-report=html',
Expand Down
5 changes: 4 additions & 1 deletion tests/theory/test_bodek_yang.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
from nnusf.theory.bodek_yang import cuts
import pytest


@pytest.mark.lhapdf
def test_upper_cut():
from nnusf.theory.bodek_yang import cuts

assert cuts.Q2MAX > 1.0

0 comments on commit 9699425

Please sign in to comment.