Skip to content
Snippets Groups Projects
Commit d171d4b1 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[P] fix a bunch of tests

parent 6a7a3b60
No related branches found
No related tags found
1 merge request!20Update bindings
Pipeline #62983 failed
......@@ -26,7 +26,7 @@ PYBIND11_MODULE(_test_grid_intersection, m)
using namespace pybind11::literals;
using namespace Dune::XT;
using G = GRID_2D;
using G = YASP_2D_EQUIDISTANT_OFFSET;
using I = Grid::extract_intersection_t<typename G::LeafGridView>;
py::module::import("dune.xt.common");
......
......@@ -41,7 +41,7 @@ template <>
void addbind_for_Grid<boost::tuples::null_type>(pybind11::module&, std::vector<std::string>&)
{}
PYBIND11_MODULE(_grid_types, m)
PYBIND11_MODULE(_test_grid_types, m)
{
namespace py = pybind11;
......
......@@ -12,17 +12,18 @@
# ~~~
import pytest
from dune.xt.test.base import load_all_submodule
from dune.xt.test.grid_types import types
from dune.xt.test import grid_types as types
def test_load_all():
import dune.xt.grid as xtc
load_all_submodule(xtc)
import dune.xt.common
import dune.xt.la
import dune.xt.grid
import dune.xt.functions
def test_empty():
from dune.xt.common._empty import Dog, Pet, Terrier
from dune.xt.common._common_empty import Dog, Pet, Terrier
dog = Dog('Susi')
pet = Pet('Bello')
......
File moved
......@@ -12,12 +12,11 @@
# ~~~
import pytest
import dune.xt.grid as xtg
from dune.xt.test import grid_types as types
import dune.xt.functions as xtf
@pytest.fixture(params=xtg.types.available_types)
@pytest.fixture(params=types.available_types)
def function_provider(request):
grid_type = request.param
dim = 1
......@@ -25,13 +24,13 @@ def function_provider(request):
dim = 2
if '3d' in grid_type:
dim = 3
fn = "ConstantFunction__{}d_to_{}x{}".format(dim, 1, 1)
fn = "ConstantFunction{}To{}d".format(dim, 1)
maker = getattr(xtf, fn)
return maker([2], 'test_function')
def test_available():
assert len(xtg.types.available_types) > 0
assert len(types.available_types) > 0
def test_grid_provider(function_provider):
......
......@@ -56,12 +56,12 @@ def test_initless_boundary_infos():
def test_normalbased_boundary_inf():
from dune.xt.grid import NormalBaseBoundaryInfo
from dune.xt.grid import NormalBasedBoundaryInfo
from dune.xt.grid import make_cube_grid, NoBoundary
from grid_provider_cube import init_args as grid_init_args
for args in grid_init_args:
grid = make_cube_grid(*args)
NormalBaseBoundaryInfo(
NormalBasedBoundaryInfo(
grid_provider=grid, default_boundary_type=NoBoundary(), tolerance=1e-10, logging_prefix='')
NormalBaseBoundaryInfo(grid_provider=grid, default_boundary_type=NoBoundary(), tolerance=1e-10)
NormalBaseBoundaryInfo(grid_provider=grid, default_boundary_type=NoBoundary())
NormalBasedBoundaryInfo(grid_provider=grid, default_boundary_type=NoBoundary(), tolerance=1e-10)
NormalBasedBoundaryInfo(grid_provider=grid, default_boundary_type=NoBoundary())
......@@ -30,7 +30,7 @@ def test_boundary():
def test_boundary_segment_index():
grid = make_cube_grid(Dim(2), Cube(), [0, 0], [1, 1], [2, 2])
call_on_each_intersection(grid, lambda intersection: print(intersection.boundary_segment_index))
call_on_each_intersection(grid, lambda intersection: intersection.boundary and print(intersection.boundary_segment_index))
def test_neighbor():
......
......@@ -10,8 +10,7 @@
# Tobias Leibner (2018 - 2020)
# ~~~
from pymortests.base import runmodule
from dune.xt.test.base import runmodule
from dune.xt.grid import Dim, Cube, Simplex, make_cube_grid, Walker
init_args = (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment