Opened 3 years ago

Closed 3 years ago

#23196 closed defect (fixed)

Some doctests in interpreters/storage.py are not run

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-8.0
Component: doctest framework Keywords:
Cc: embray Merged in:
Authors: Jeroen Demeyer Reviewers: Erik Bray
Report Upstream: N/A Work issues:
Branch: 78abaae (Commits) Commit: 78abaae0cb2eafe0fa743e4660bb4f49532f54ed
Dependencies: #23206 Stopgaps:

Description

There seems to be something wrong with the doctest parser: the doctest of alloc_chunk_data() in src/sage_setup/autogen/interpreters/storage.py is not run:

$ ./sage -t --verbose src/sage_setup/autogen/interpreters/storage.py
Trying (line 287):    from sage_setup.autogen.interpreters import *
Expecting nothing
ok [0.00 s]
Trying (line 288):    ty_mpfr.declare_chunk_class_members('args')
Expecting:
    u'    cdef int _n_args\n    cdef mpfr_t* _args\n'
ok [0.00 s]
Trying (line 290):    sig_on_count() # check sig_on/off pairings (virtual doctest)
Expecting:
    0
ok [0.00 s]
Trying (line 369):    from sage_setup.autogen.interpreters import *
Expecting nothing
ok [0.00 s]
Trying (line 370):    ty_double.class_member_declarations
Expecting:
    ''
ok [0.00 s]

Change History (14)

comment:1 Changed 3 years ago by embray

It seems the one after it, dealloc_chunk_data, is also not run. Weird. I have no idea.

comment:2 Changed 3 years ago by jdemeyer

  • Branch set to u/jdemeyer/some_doctests_in_interpreters_storage_py_are_not_run

comment:3 Changed 3 years ago by embray

  • Commit set to 78abaae0cb2eafe0fa743e4660bb4f49532f54ed

Just found that myself.


New commits:

78abaaeFix doctest parsing with triple quotes inside parentheses

comment:4 Changed 3 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Status changed from new to needs_review

I'm currently running all doctests with and without this patch to see if any other doctests are affected and check for regressions. This will take a while...

comment:5 Changed 3 years ago by embray

I'm doing the same. How did you even notice that?

comment:6 Changed 3 years ago by jdemeyer

  • Status changed from needs_review to needs_work

Regression in src/sage/combinat/partition_algebra.py:

Before:

sage -t src/sage/combinat/partition_algebra.py
    [302 tests, 10.18 s]

After:

sage -t src/sage/combinat/partition_algebra.py
    [241 tests, 9.45 s]

comment:7 Changed 3 years ago by jdemeyer

See #23206.

comment:8 Changed 3 years ago by vbraun

  • Priority changed from blocker to major

Doesn't cause any wrong answers from Sage, so I wouldn't call this a blocker.

comment:9 Changed 3 years ago by jdemeyer

For the record: I made it a blocker because it's a recent regression. There could also be undetected issues if some doctests are not being run.

comment:10 Changed 3 years ago by jdemeyer

  • Status changed from needs_work to needs_review

I just finished the tests that I mentioned in 4. The changes are:

  1. src/sage/combinat/partition_algebra.py: 302 tests -> 241 tests. Fixed in #23206.
  1. Various files in src/sage_setup/autogen/interpreters: in all cases, the number of tests increased.

comment:11 Changed 3 years ago by jdemeyer

  • Dependencies set to #23206

comment:12 Changed 3 years ago by embray

  • Status changed from needs_review to positive_review

comment:13 Changed 3 years ago by jdemeyer

  • Reviewers set to Erik Bray

comment:14 Changed 3 years ago by vbraun

  • Branch changed from u/jdemeyer/some_doctests_in_interpreters_storage_py_are_not_run to 78abaae0cb2eafe0fa743e4660bb4f49532f54ed
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.