From 00efc7222eaac51710ca928664660187d6d023fe Mon Sep 17 00:00:00 2001 From: Andrew Simms Date: Tue, 5 Dec 2023 12:36:14 -0700 Subject: [PATCH] Tests: Use mkhit without explicit import --- mhkit/tests/Python_Import.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mhkit/tests/Python_Import.m b/mhkit/tests/Python_Import.m index 0d329d764..06b04f6f2 100644 --- a/mhkit/tests/Python_Import.m +++ b/mhkit/tests/Python_Import.m @@ -23,6 +23,21 @@ function test_h5py_import(testCase) % Verify output of the 'circular' function from 'mhkit' function verify_mhkit_output(testCase) + py.importlib.import_module('mhkit'); + [x, y] = circular(30); + + expected_x = 30; + expected_y = 706.8583; + + y_variance = abs(y - expected_y); + + assertEqual(testCase, x, expected_x); + assertLessThan(testCase, y_variance, 0.01); + end + + % Verify output of the 'circular' function from 'mhkit' + function verify_mhkit_output_without_importing_module(testCase) + % py.importlib.import_module('mhkit'); [x, y] = circular(30); expected_x = 30;