Ticket #14331: trac14331_missed.patch

File trac14331_missed.patch, 1.1 KB (added by ohanar, 9 years ago)

apply to sage library

  • sage/doctest/control.py

    # HG changeset patch
    # User R. Andrew Ohana <andrew.ohana@gmail.com>
    # Date 1364149585 25200
    # Node ID 4464e62ac500fa33657d4016ec64365a121ecac2
    # Parent  47115c484d4437bd571e5719eaf3e981af5293e5
    doctesting: fix last reference to Sage's directory structure
    
    diff --git a/sage/doctest/control.py b/sage/doctest/control.py
    a b  
    2020import random, os, sys, time, json, re, types
    2121import sage.misc.flatten
    2222from sage.structure.sage_object import SageObject
    23 from sage.misc.misc import DOT_SAGE
     23from sage.env import DOT_SAGE, SAGE_LIB, SAGE_SRC
    2424
    2525from sources import FileDocTestSource, DictAsObject
    2626from forker import DocTestDispatcher
     
    828828            F = [stringify(a) for a in x]
    829829            return sage.misc.flatten.flatten(F)
    830830        elif isinstance(x, types.ModuleType):
    831             F = re.sub(os.path.join("local","lib", r"python[0-9\.]*","site-packages"),os.path.join("devel","sage"),x.__file__)
     831            F = x.__file__.replace(SAGE_LIB, SAGE_SRC)
    832832            base, pyfile = os.path.split(F)
    833833            file, ext = os.path.splitext(pyfile)
    834834            if ext == ".pyc":