apjanke / octave-packajoozle

A just-for-fun reworking of GNU Octave's `pkg` tool
GNU General Public License v3.0
4 stars 1 forks source link

`pkj test`: issue error when packages are not loaded #48

Open apjanke opened 5 years ago

apjanke commented 5 years ago

D'oh!

octave:2> pkj list
PackageName | Version | InstallationDir
------------+---------+---------------------
dicom       | 0.2.2   | ~/octave/dicom-0.2.2
io          | 2.4.12  | ~/octave/io-2.4.12

Non-installed packages on Octave load path:
Name        | Version | Dir                              | Status
------------+---------+----------------------------------+-------
packajoozle | 0.0.0+  | ~/local/repos/octave-packajoozle |
octave:3> pkj test io
pkj: testing package io 2.4.12
Processing files in /Users/janke/octave/io-2.4.12:

  calccelladdress.m ........................................... PASS      0/9
                                                                  FAIL    9
  object2json.m ............................................... PASS      0/2
                                                                  FAIL    2
  read_namelist.m ............................................. PASS      0/3
                                                                  FAIL    3

The following files in /Users/janke/octave/io-2.4.12 have no tests:

__exit_io__.m              io_ods_testscript.m        odswrite.m                 xls2oct.m
__init_io__.m              io_xls_testscript.m        parsecell.m                xlsclose.m
append_save.m              oct2ods.m                  pch2mat.m                  xlsfinfo.m
chk_spreadsheet_support.m  oct2xls.m                  rfsearch.m                 xlsopen.m
dbfread.m                  ods2oct.m                  test_spsh.m                xlsread.m
dbfwrite.m                 odsclose.m                 tidyxml.m                  xlswrite.m
fexist.m                   odsfinfo.m                 unicode2utf8.m             xmlread.m
getxmlattv.m               odsopen.m                  utf82unicode.m             xmlwrite.m
getxmlnode.m               odsread.m                  write_namelist.m
Processing files in /Users/janke/octave/x86_64-apple-darwin18.2.0-api-v53+/io-2.4.12:

octave:4>
mtmiller commented 4 years ago

You might want to compare with Octave#41215 about a first stab at adding pkg test. I think the latest iteration is to attempt to load unloaded packages when testing them, and unload them again after test finishes.

apjanke commented 4 years ago

Okay. Thanks for the heads up. That sounds like probably a better approach.