Skip to content

Test-abort error for Tablicious, maybe around classes in namespaces, or categorical.missing #283

@apjanke

Description

@apjanke

Hi, doctest folks,

I'm working on the Tablicious package, and I'd like to make it "doctest clean", so it passes doctest, even if that doesn't do significant exercising of its code.

When running doctest inst against Tablicious HEAD of main a bit after v0.4.2, I get this "class not found: tblish.internal.dataset" error that seems to abort the whole doctest run.

Repro code:

# repro_doctest_tblish_error.m
# Reproduce apjanke's doctest errors for Tablicious

addpath ~/repos/octave-tablicious/inst
addpath ~/repos/octave-doctest/inst

# Not all the way in to inst; want to rely on regular octave path and not cwd.
cd ~/repos/octave-tablicious

doctest inst

I get:

>> version
ans = 8.4.0
>> pwd
ans = /Users/janke
>>
>> repro_doctest_tblish_error
Doctest v0.8.0+: this is Free Software without warranty, see source.

inst/
  +tblish/
    +examples/
      +internal/
        +datasets/
          AirPassengers_1.m ............................ NO TESTS
          BJsales_1.m .................................. NO TESTS
          BOD_1.m ...................................... NO TESTS
          ChickWeight_1.m .............................. NO TESTS
          DNase_1.m .................................... NO TESTS
          EuStockMarkets_1.m ........................... NO TESTS
[...]
  calendarDuration.vertcat ............................. NO TESTS
error: unknown package 'categorical'
error: called from
    <unknown>
    doctest_collect>extract_docstring at line 367 column 25
    doctest_collect>collect_targets_class at line 330 column 38
    doctest_collect at line 167 column 11
    doctest_collect at line 147 column 13
    doctest at line 356 column 11
    repro_doctest_tblish_error at line 13 column 1
>>
>> pwd
ans = /Users/janke/repos/octave-tablicious/inst
>>

Note that it ends up in a different directory than I started in, too. With a dbstop if error, stopped at that same place:

debug> name
name = categorical.missing
debug> dbup
stopped in doctest_collect>collect_targets_class at line 330 [/Users/janke/repos/octave-doctest/inst/private/doctest_collect.m]
debug> dbup
stopped in doctest_collect at line 167 [/Users/janke/repos/octave-doctest/inst/private/doctest_collect.m]
debug> w
w = @categorical
debug> depth
depth = 1
debug>

I'm thinking maybe this is a problem with support for methods in classes, classes in namespaces, some combination of both, or maybe I'm just writing my texinfo sections wrong?

I ran this against commit f0e346ab97eba11462d510305550bc371e797f4d in Tablicious (apjanke/octave-tablicious@f0e346a).

I'm trying to make a minimal repro case in branch WIP/repro-categorical-missing-error in repo apjanke/octo-docto-repro, but haven't had luck yet.

References

Here's my own ticket in Tablicious about ~this: apjanke/octave-tablicious#129

@mmuetzel originally reported something like this in gnu-octave/packages#401. Though there it was failing on something different, and in some of my other tests, it is choking on categorical.missing (a static method in Tablicious's categorical class) instead of the tblish.internal.dataset error I'm getting here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions