Opened 4 years ago

Last modified 3 years ago

#23686 new enhancement

Make some_elements() of products more interesting

Reported by: saraedum Owned by:
Priority: major Milestone: sage-8.1
Component: doctest coverage Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


A common pattern used in doctests is

S = tester.some_elements()
M = cartesian product of S
for x,y in tester.some_elements(M):
    check things

Sometimes we need to set max_runs to make this product not get too big (especially if it is more than two copies of S involved.)

The current implementation of some_elemnts() then just takes the first few elements of the product. This is unfortunate because it means that we are not testing an interesting subset of the product.

Change History (3)

comment:1 Changed 4 years ago by tscrim

You want some magic code that can tell what objects are interesting. Instead you should just actually better use some_elements. I think the goal of this is impossible and there are tangible, good solutions. Thus we should close this as invalid.

comment:2 Changed 4 years ago by roed

Travis and I had a discussion in person, resulting in #23724. I think we should return to this discussion after that ticket is resolved.

comment:3 Changed 3 years ago by jdemeyer

  • Component changed from doctest framework to doctest coverage
Note: See TracTickets for help on using tickets.