tests package#

tests.matlab_mock module#

class tests.matlab_mock.MockMatlabEngine(*args, **kw)[source]#

Bases: MagicMock

A mock object for the matlab.engine module. This mock object can be used in unit tests that involve the matlab.engine module. It provides a connect() method that returns an instance of the MockMatlabEngine class.

classmethod connect(*args, **kwargs)[source]#

Returns an instance of the MockMatlabEngine class.

This method is used to mock the behavior of the matlab.engine.connect() function. It returns an instance of the MockMatlabEngine class, which can be used in unit tests to simulate the behavior of a real MATLAB engine.

Returns:

An instance of the MockMatlabEngine class.

tests.fe_test module#

class tests.fe_test.TestFeatureExtractor(methodName='runTest')[source]#

Bases: TestCase

Test the feature_extractor() function. This test verifies that the output of the feature_extractor() function has the expected data types, shapes, and values.

test_feature_extractor()[source]#

tests.reading_test module#

class tests.reading_test.TestDataPath(methodName='runTest')[source]#

Bases: TestCase

This class defines the unit tests for the ‘data_path’ function in ‘ML_tools.reading’ module.

setUp()[source]#

This method sets up the temporary directory and creates test files for the unit tests.

test_data_path()[source]#

This method tests whether the ‘data_path’ function returns the correct number of files for a given directory and subdirectory.