Skip to content

Commit 0987c37

Browse files
committed
legacy no arguments check
1 parent 857077d commit 0987c37

File tree

3 files changed

+16
-22
lines changed

3 files changed

+16
-22
lines changed

+stdlib/+python/has_psutil.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
%% PYTHON.HAS_PSUTIL is Python psutil module availble
22

33
function y = has_psutil(force_old)
4-
arguments
5-
force_old (1,1) logical = false
4+
if nargin < 1
5+
force_old = false;
66
end
77

88
y = false;

+stdlib/set_permissions.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
% native backend is much more robust, if available
1313

1414
function [ok, b] = set_permissions(file, readable, writable, executable)
15-
arguments
16-
file
17-
readable (1,1) {mustBeInteger}
18-
writable (1,1) {mustBeInteger}
19-
executable (1,1) {mustBeInteger}
20-
end
21-
2215

2316
try
2417
ok = stdlib.native.set_permissions(file, readable, writable, executable);

test/TestPlatform.m

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,19 @@ function test_all_toolboxes(tc)
1818

1919
methods (Test, TestTags={'R2017b', 'toolbox'})
2020

21+
function test_has_parallel_toolbox(tc)
22+
y = stdlib.has_parallel_toolbox();
23+
tc.verifyClass(y, 'logical')
24+
tc.verifyNotEmpty(y)
25+
end
26+
27+
end
28+
29+
30+
methods (Test, TestTags={'R2018a'})
31+
2132
function test_toolbox_used(tc)
33+
tc.assumeFalse(stdlib.matlabOlderThan('R2018a'))
2234
r = fullfile(fileparts(fileparts(mfilename('fullpath'))), '+stdlib');
2335
[mathworksUsed, userFun] = stdlib.toolbox_used(r);
2436
Nlicense = length(mathworksUsed);
@@ -32,23 +44,13 @@ function test_toolbox_used(tc)
3244
tc.verifyEqual(length(mathworksUsed), 1)
3345
end
3446

35-
36-
function test_has_parallel_toolbox(tc)
37-
y = stdlib.has_parallel_toolbox();
38-
tc.verifyClass(y, 'logical')
39-
tc.verifyNotEmpty(y)
40-
end
41-
42-
end
43-
44-
45-
methods (Test, TestTags={'R2018a'})
4647
function test_perl(tc)
4748
tc.assumeFalse(stdlib.matlabOlderThan('R2018a'))
4849
tc.verifyNotEmpty(stdlib.perl_exe())
4950
tc.verifyNotEmpty(stdlib.perl_version())
5051
tc.verifyTrue(stdlib.has_perl(), "Matlab docs indicate that Perl should always be available")
5152
end
53+
5254
end
5355

5456

@@ -60,6 +62,7 @@ function test_platform_tell(tc)
6062
tc.verifyNotEmpty(r)
6163
end
6264

65+
6366
function test_is_cygwin(tc)
6467
tc.verifyFalse(stdlib.is_cygwin())
6568
end
@@ -132,8 +135,6 @@ function test_cpu_count(tc)
132135
tc.verifyGreaterThan(stdlib.cpu_count(), 0)
133136
end
134137

135-
136-
137138
end
138139

139140
end

0 commit comments

Comments
 (0)