mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
use pytest-check
This commit is contained in:
parent
1502fd705e
commit
ba7fc03800
@ -2,4 +2,5 @@ FROM ubuntu:19.10
|
|||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
MAINTAINER Matthias Hochsteger <matthias.hochsteger@tuwien.ac.at>
|
MAINTAINER Matthias Hochsteger <matthias.hochsteger@tuwien.ac.at>
|
||||||
RUN apt-get update && apt-get -y install python3 libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk clang-tidy python3-distutils clang libocct-data-exchange-dev libcgns-dev libhdf5-dev
|
RUN apt-get update && apt-get -y install python3 libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk clang-tidy python3-distutils clang libocct-data-exchange-dev libcgns-dev libhdf5-dev
|
||||||
|
RUN python3 -m pip install pytest-check
|
||||||
ADD . /root/src/netgen
|
ADD . /root/src/netgen
|
||||||
|
@ -2,5 +2,5 @@ FROM ubuntu:20.04
|
|||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
MAINTAINER Matthias Hochsteger <matthias.hochsteger@tuwien.ac.at>
|
MAINTAINER Matthias Hochsteger <matthias.hochsteger@tuwien.ac.at>
|
||||||
RUN apt-get update && apt-get -y install python3 libpython3-dev python3-pip libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk python3-mpi4py clang-tidy python3-distutils clang libopenmpi-dev openmpi-bin gfortran
|
RUN apt-get update && apt-get -y install python3 libpython3-dev python3-pip libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk python3-mpi4py clang-tidy python3-distutils clang libopenmpi-dev openmpi-bin gfortran
|
||||||
RUN python3 -m pip install pytest-mpi
|
RUN python3 -m pip install pytest-mpi pytest-check
|
||||||
ADD . /root/src/netgen
|
ADD . /root/src/netgen
|
||||||
|
@ -2,6 +2,7 @@ from netgen.geom2d import *
|
|||||||
import pytest
|
import pytest
|
||||||
import math
|
import math
|
||||||
from pytest import approx
|
from pytest import approx
|
||||||
|
from pytest_check import check
|
||||||
|
|
||||||
|
|
||||||
def check_area(geo, area):
|
def check_area(geo, area):
|
||||||
@ -14,7 +15,7 @@ def check_area(geo, area):
|
|||||||
ngs = pytest.importorskip("ngsolve")
|
ngs = pytest.importorskip("ngsolve")
|
||||||
mesh = ngs.Mesh(m)
|
mesh = ngs.Mesh(m)
|
||||||
mesh.Curve(5)
|
mesh.Curve(5)
|
||||||
assert ngs.Integrate(1.0, mesh) == approx(area)
|
with check: assert ngs.Integrate(1.0, mesh) == approx(area)
|
||||||
|
|
||||||
def test_two_circles():
|
def test_two_circles():
|
||||||
c1 = Circle(center=(0,0), radius=1)
|
c1 = Circle(center=(0,0), radius=1)
|
||||||
|
Loading…
Reference in New Issue
Block a user