Ticket #11898 (closed defect: fixed)

Opened 20 months ago

Last modified 20 months ago

Testing sage/misc/hg.py verbosely starts "less"

Reported by: jdemeyer Owned by: mvngu
Priority: blocker Milestone: sage-4.7.2
Component: doctest coverage Keywords: mercurial hg pager
Cc: jhpalmieri, kini, kcrisman Work issues:
Report Upstream: N/A Reviewers: Jeroen Demeyer
Authors: John Palmieri Merged in: sage-4.7.2.alpha4
Dependencies: Stopgaps:

Description

With sage-4.7.2.alpha3, executing the command

./sage -t -verbose "devel/sage/sage/misc/hg.py"

makes the doctest process start up less.

Probably caused by #11142 but see also #11121 and #10594.

Attachments

trac_11898-hg.patch Download (905 bytes) - added by jhpalmieri 20 months ago.
Sage library

Change History

comment:1 Changed 20 months ago by jdemeyer

  • Keywords mercurial hg pager added

comment:2 Changed 20 months ago by jhpalmieri

  • Status changed from new to needs_review
  • Authors set to John Palmieri

That's strange. I don't know the differences between verbose testing and regular that would cause this.

The attached patch fixes the problem for me, but it would also be nice to actually understand what's going on.

Changed 20 months ago by jhpalmieri

Sage library

comment:3 Changed 20 months ago by jhpalmieri

Another option would be a patch like this (in the pager function):

  • sage/misc/hg.py

    diff --git a/sage/misc/hg.py b/sage/misc/hg.py
    a b def pager(): 
    112112        '--config pager.pager=cat' 
    113113        sage: sage.server.support.EMBEDDED_MODE=False 
    114114    """ 
    115     if embedded(): 
     115    from sage.plot.plot import DOCTEST_MODE 
     116    if embedded() or DOCTEST_MODE: 
    116117        return '--config pager.pager=cat' 
    117118    else: 
    118119        return '--config pager.pager="LESS=\'R\' less"' 

This would require changing the doctests for the pager function, and those doctests wouldn't be as helpful.

comment:4 Changed 20 months ago by jdemeyer

  • Status changed from needs_review to positive_review
  • Reviewers set to Jeroen Demeyer

I like your "not tested" patch. Easy and does the job.

comment:5 Changed 20 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.7.2.alpha4
Note: See TracTickets for help on using tickets.