diff --git a/conftest.py b/conftest.py index 743b3562e9e4185a373b97eaaa0fb70813c16c13..d21cab65e83e844d7ea6ebb1c01e3ac6baddf8d3 100644 --- a/conftest.py +++ b/conftest.py @@ -46,6 +46,11 @@ except ImportError: collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/test_serial_scenarios.py")] collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/test_datahandling_parallel.py")] +try: + import blitzdb +except ImportError: + collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/benchmark"), + os.path.join(SCRIPT_FOLDER, "lbmpy_tests/full_scenarios/kida_vortex_flow/scenario_kida_vortex_flow.py")] collect_ignore += [os.path.join(SCRIPT_FOLDER, 'setup.py')] @@ -104,7 +109,7 @@ class IPyNbFile(pytest.File): exporter.exclude_markdown = True exporter.exclude_input_prompt = True - notebook_contents = self.fspath.open() + notebook_contents = self.fspath.open(encoding='utf-8') with warnings.catch_warnings(): warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated") diff --git a/lbmpy_tests/phasefield/test_nphase_1D.py b/lbmpy_tests/phasefield/test_nphase_1D.py index ce265386c35110c8ef985de28d68df390ef49f95..71359a97d27a4dffe33bf020220aa8cfe8e441cb 100644 --- a/lbmpy_tests/phasefield/test_nphase_1D.py +++ b/lbmpy_tests/phasefield/test_nphase_1D.py @@ -8,7 +8,6 @@ from lbmpy.phasefield.analytical import ( from lbmpy.phasefield.experiments1D import init_sharp_interface from lbmpy.phasefield.scenarios import create_n_phase_model from pystencils import create_data_handling, make_slice -from pystencils.runhelper import ParameterStudy def extract_profile(sc, width, phase_idx=1): @@ -111,6 +110,7 @@ def study_1d(study): if __name__ == '__main__': + from pystencils.runhelper import ParameterStudy s = ParameterStudy(run_n_phase_1d) study_1d(s) s.run_from_command_line() diff --git a/lbmpy_tests/phasefield/test_nphase_2D.py b/lbmpy_tests/phasefield/test_nphase_2D.py index 7d4359d90a1e09ce3494ff5175cafc2393cec56e..0254c944649ec503a86fa2d6539c20c5f0e8aa5f 100644 --- a/lbmpy_tests/phasefield/test_nphase_2D.py +++ b/lbmpy_tests/phasefield/test_nphase_2D.py @@ -9,7 +9,6 @@ from lbmpy.phasefield.contact_angle_circle_fitting import liquid_lens_neumann_an from lbmpy.phasefield.post_processing import analytic_neumann_angles from lbmpy.phasefield.scenarios import create_n_phase_model, create_three_phase_model from pystencils import create_data_handling, make_slice -from pystencils.runhelper import ParameterStudy from pystencils.utils import boolean_array_bounding_box color = {'yellow': '\033[93m', @@ -209,6 +208,7 @@ def study_2d(study, **kwargs): def main(): + from pystencils.runhelper import ParameterStudy s = ParameterStudy(run_n_phase_2d) # study_3phase(s) study_2d(s)