adds pytest options to toml
Some checks failed
gitea-physics/pysuperconductor/pipeline/head There was a failure building this commit
Some checks failed
gitea-physics/pysuperconductor/pipeline/head There was a failure building this commit
This commit is contained in:
parent
75c1dda67c
commit
bde80bf238
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -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
2
do.sh
@ -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() {
|
||||
|
@ -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"
|
||||
|
@ -1,5 +1,9 @@
|
||||
import logging
|
||||
from pysuperconductor.meta import __version__
|
||||
|
||||
|
||||
def get_version():
|
||||
return __version__
|
||||
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user