testing also functions with graphical output

This commit is contained in:
Martin Diehl 2020-11-15 11:49:52 +01:00
parent 15af12bbb4
commit 01d84c1477
4 changed files with 4 additions and 4 deletions

View File

@ -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}'

View File

@ -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):

View File

@ -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):

View File

@ -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):