Skip to content

Commit

Permalink
Tests: Use mkhit without explicit import
Browse files Browse the repository at this point in the history
  • Loading branch information
simmsa committed Dec 5, 2023
1 parent 771b367 commit 00efc72
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mhkit/tests/Python_Import.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 00efc72

Please sign in to comment.