Skip to content

Commit 7d8cbfc

Browse files
committed
auto-add path
1 parent 476583c commit 7d8cbfc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/test_nomex.m

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ function test_nomex()
22
import matlab.unittest.TestSuite
33
import matlab.unittest.selectors.HasTag
44

5-
suite = TestSuite.fromFolder(fileparts(mfilename('fullpath')));
5+
cwd = fileparts(mfilename('fullpath'));
66

7-
sel = ~HasTag("exe") & ~HasTag("mex") & ~HasTag("symlink");
7+
root = fileparts(cwd);
8+
addpath(root)
89

9-
suite = suite.selectIf(sel);
10+
suite = TestSuite.fromFolder(cwd);
11+
12+
sel = ~HasTag("exe") & ~HasTag("mex");
1013

11-
runner = testrunner();
14+
suite = suite.selectIf(sel);
1215

13-
r = run(runner, suite);
16+
r = run(testrunner(), suite);
1417

1518
assert(~isempty(r), "No tests were run")
1619
assertSuccess(r)

0 commit comments

Comments
 (0)