adds pytest options to toml
Some checks failed
gitea-physics/pysuperconductor/pipeline/head There was a failure building this commit

This commit is contained in:
Deepak Mallubhotla 2020-11-22 15:29:13 -06:00
parent 75c1dda67c
commit bde80bf238
5 changed files with 13 additions and 3 deletions

2
Jenkinsfile vendored
View File

@ -32,7 +32,7 @@ pipeline {
parallel{
stage('pytest') {
steps {
sh '${POETRY_HOME}/bin/poetry run pytest tests --junitxml pytest.xml -o junit_family=xunit1 --cov pysuperconductor --cov-report=xml:coverage.xml'
sh '${POETRY_HOME}/bin/poetry run pytest'
}
}
stage('lint') {

2
do.sh
View File

@ -12,7 +12,7 @@ build() {
test() {
echo "I am ${FUNCNAME[0]}ing"
poetry run flake8
poetry run pytest tests --cov pysuperconductor
poetry run pytest
}
all() {

View File

@ -17,3 +17,8 @@ pytest-cov = "^2.10.1"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[tool.pytest.ini_options]
junit_family = "xunit1"
testpaths = ["tests"]
addopts = "--junitxml pytest.xml --cov pysuperconductor --cov-report=xml:coverage.xml --cov-fail-under=90"

View File

@ -1,5 +1,9 @@
import logging
from pysuperconductor.meta import __version__
def get_version():
return __version__
logging.getLogger(__name__).addHandler(logging.NullHandler())

View File

@ -1,6 +1,7 @@
import numpy
import scipy.integrate as integrate
import scipy.optimize
import logging
def energy(freq, delta):
@ -28,5 +29,5 @@ def equilibrium_gap(temp, debye_frequency, nv):
lambda d: gap_integral(temp, d, 0, debye_frequency) - nv_inv,
x0=debye_frequency / (numpy.sinh(nv_inv))
)
print(sol)
logging.info(sol)
return sol.x