testing also functions with graphical output
This commit is contained in:
parent
15af12bbb4
commit
01d84c1477
|
@ -26,7 +26,7 @@ def patch_datetime_now(monkeypatch):
|
||||||
monkeypatch.setattr(datetime, 'datetime', mydatetime)
|
monkeypatch.setattr(datetime, 'datetime', mydatetime)
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def execution_stamp(monkeypatch):
|
def patch_execution_stamp(monkeypatch):
|
||||||
"""Set damask.util.execution_stamp for reproducible tests results."""
|
"""Set damask.util.execution_stamp for reproducible tests results."""
|
||||||
def execution_stamp(class_name,function_name=None):
|
def execution_stamp(class_name,function_name=None):
|
||||||
_function_name = '' if function_name is None else f'.{function_name}'
|
_function_name = '' if function_name is None else f'.{function_name}'
|
||||||
|
|
|
@ -17,7 +17,7 @@ def reference_dir(reference_dir_base):
|
||||||
class TestColormap:
|
class TestColormap:
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def _execution_stamp(self, execution_stamp):
|
def _patch_execution_stamp(self, patch_execution_stamp):
|
||||||
print('patched damask.util.execution_stamp')
|
print('patched damask.util.execution_stamp')
|
||||||
|
|
||||||
def test_conversion(self):
|
def test_conversion(self):
|
||||||
|
|
|
@ -34,7 +34,7 @@ def reference_dir(reference_dir_base):
|
||||||
class TestGeom:
|
class TestGeom:
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def _execution_stamp(self, execution_stamp):
|
def _patch_execution_stamp(self, patch_execution_stamp):
|
||||||
print('patched damask.util.execution_stamp')
|
print('patched damask.util.execution_stamp')
|
||||||
|
|
||||||
def test_diff_equal(self,default):
|
def test_diff_equal(self,default):
|
||||||
|
|
|
@ -23,7 +23,7 @@ def default():
|
||||||
class TestVTK:
|
class TestVTK:
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def _execution_stamp(self, execution_stamp):
|
def _patch_execution_stamp(self, patch_execution_stamp):
|
||||||
print('patched damask.util.execution_stamp')
|
print('patched damask.util.execution_stamp')
|
||||||
|
|
||||||
def test_rectilinearGrid(self,tmp_path):
|
def test_rectilinearGrid(self,tmp_path):
|
||||||
|
|
Loading…
Reference in New Issue