Opened 11 years ago

Closed 11 years ago

#11898 closed defect (fixed)

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 Merged in: sage-4.7.2.alpha4
Authors: John Palmieri Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

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 (1)

trac_11898-hg.patch (905 bytes) - added by jhpalmieri 11 years ago.
Sage library

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by jdemeyer

  • Keywords mercurial hg pager added

comment:2 Changed 11 years ago by jhpalmieri

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

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 11 years ago by jhpalmieri

Sage library

comment:3 Changed 11 years 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 11 years ago by jdemeyer

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

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

comment:5 Changed 11 years ago by jdemeyer

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