Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(384)  |  Call(189)  |  Derive(0)  |  Import(195)
Is it a writable file system distro being invoked within
test directory?  If so, can write test output here.  If not,
it had better go in a temp directory.  Only do this once per
process

        def setOutDir(name):
    """Is it a writable file system distro being invoked within
    test directory?  If so, can write test output here.  If not,
    it had better go in a temp directory.  Only do this once per
    process"""
    global _OUTDIR, RL_HOME, testsFolder
    if _OUTDIR: return _OUTDIR
    D = [d[9:] for d in sys.argv if d.startswith('--outdir=')]
    if D:
        _OUTDIR = D[-1]
        try:
            os.makedirs(_OUTDIR)
        except:
            pass
        for d in D: sys.argv.remove(d)
    else:
        assert name=='__main__',"setOutDir should only be called in the main script"
        scriptDir=os.path.dirname(sys.argv[0])
        if not scriptDir: scriptDir=os.getcwd()
        _OUTDIR = scriptDir

    if not isWritable(_OUTDIR):
        _OUTDIR = get_rl_tempdir('reportlab_test')

    import reportlab
    RL_HOME=reportlab.__path__[0]
    if not os.path.isabs(RL_HOME): RL_HOME=os.path.normpath(os.path.abspath(RL_HOME))
    topDir = os.path.dirname(RL_HOME)
    testsFolder = os.path.join(topDir,'tests')
    if not os.path.isdir(testsFolder):
        testsFolder = os.path.join(os.path.dirname(topDir),'tests')
    if not os.path.isdir(testsFolder):
        if name=='__main__':
            scriptDir=os.path.dirname(sys.argv[0])
            if not scriptDir: scriptDir=os.getcwd()
            testsFolder = os.path.abspath(scriptDir)
        else:
            testsFolder = None
    if testsFolder:
        sys.path.insert(0,os.path.dirname(testsFolder))
    return _OUTDIR
        


src/m/w/mwlib.ext-0.13.2/upstream-src/docs/genAll.py   mwlib.ext(Download)
def _genAll(verbose=1):
    from reportlab.lib.testutils import setOutDir
    setOutDir(__name__)
    from reportlab.lib.testutils import testsFolder
    topDir=os.path.dirname(testsFolder)

src/r/e/reportlab-3.1.8/docs/genAll.py   reportlab(Download)
def _genAll(verbose=1):
    from reportlab.lib.testutils import setOutDir
    setOutDir(__name__)
    from reportlab.lib.testutils import testsFolder
    topDir=os.path.dirname(testsFolder)

src/r/e/ReportLab-HEAD/docs/genAll.py   ReportLab(Download)
def _genAll(verbose=1):
    from reportlab.lib.testutils import setOutDir
    setOutDir(__name__)
    from reportlab.lib.testutils import testsFolder
    topDir=os.path.dirname(testsFolder)

src/m/w/mwlib.ext-0.13.2/upstream-src/tests/test_source_chars.py   mwlib.ext(Download)
"""This tests for things in source files.  Initially, absence of tabs :-)
"""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, SecureTestCase, GlobDirectoryWalker, printLocation
setOutDir(__name__)
from reportlab.lib.testutils import RL_HOME,testsFolder

src/r/e/reportlab-3.1.8/tests/test_source_chars.py   reportlab(Download)
"""This tests for things in source files.  Initially, absence of tabs :-)
"""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, SecureTestCase, GlobDirectoryWalker, printLocation
setOutDir(__name__)
from reportlab.lib.testutils import RL_HOME,testsFolder

src/r/e/ReportLab-HEAD/tests/test_source_chars.py   ReportLab(Download)
"""This tests for things in source files.  Initially, absence of tabs :-)
"""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, SecureTestCase, GlobDirectoryWalker, printLocation
setOutDir(__name__)
from reportlab.lib.testutils import RL_HOME,testsFolder

src/m/w/mwlib.ext-0.13.2/upstream-src/tests/test_pyfiles.py   mwlib.ext(Download)
"""Tests performed on all Python source files of the ReportLab distribution.
"""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, SecureTestCase, GlobDirectoryWalker, outputfile, printLocation
setOutDir(__name__)
import os, sys, string, fnmatch, re

src/r/e/reportlab-3.1.8/tests/test_pyfiles.py   reportlab(Download)
"""Tests performed on all Python source files of the ReportLab distribution.
"""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, SecureTestCase, GlobDirectoryWalker, outputfile, printLocation
setOutDir(__name__)
import os, sys, string, fnmatch, re

src/r/e/ReportLab-HEAD/tests/test_pyfiles.py   ReportLab(Download)
"""Tests performed on all Python source files of the ReportLab distribution.
"""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, SecureTestCase, GlobDirectoryWalker, outputfile, printLocation
setOutDir(__name__)
import os, sys, string, fnmatch, re

src/m/w/mwlib.ext-0.13.2/upstream-src/tests/runAll.py   mwlib.ext(Download)
    P=[]
    try:
        from reportlab.lib.testutils import setOutDir
    except ImportError:
        if __name__=='__main__':
        P.append(topDir)
        del topDir
        from reportlab.lib.testutils import setOutDir
 
    setOutDir(__name__)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next