matlab.unittest.fixtures.PathFixture class
Package:matlab.unittest.fixtures
Fixture for temporarily adding folders to theMATLABpath
Description
ThePathFixture
class provides a fixture for temporarily adding folders to the MATLAB®path. When the testing framework sets up the fixture, it adds the specified folders to the path. When the framework tears down the fixture, it restores the MATLAB path to its previous state.
Construction
matlab.unittest.fixtures.PathFixture(
constructs a fixture for temporarily adding folders to the MATLAB path.folders
)
matlab.unittest.fixtures.PathFixture(
constructs a fixture with additional options specified by one or more name-value pair arguments. For example,folders
,Name,Value
)matlab.unittest.fixtures.PathFixture('myFolder','IncludingSubfolders',true)
constructs a fixture that addsmyFolder
and all of its subfolders to the path.
Input Arguments
Properties
|
Folders to add to the MATLAB path, specified as a string array. This property is read-only and corresponds to the |
|
Indicator to include subfolders of |
|
Where to add folders, specified as |
Copy Semantics
句柄。学习如何处理类影响复制operations, seeCopying Objects.