dirlist        = {"utl","asm","tst","nls","prs","sbn"};
[basename,dir] = fileparts(fileparts (mfilename ("fullpath")));

for ii=1:length(dirlist)
  if (! exist (fullfile (basename, "inst"), "dir"))
    ## Run this if the package is installed
    rmpath ( [ basename "/" dirlist{ii}])
  else
    ## Run this if we are testing the package is installed without installation
    rmpath ( [ fileparts( mfilename("fullpath")) "/inst/" dirlist{ii}])
  end
end