Table of Contents

Class: TestRun py4cs/Regression.py

Utility for writing individual regression tests. Example on usage: from py4cs.Regression import TestRun test = TestRun("test1.v") # run a program, place output on test1.v: test.run("myprog", options="-g -p 3.2", inputfile="test1.i") # append a file to test1.v: test.append("res1.dat")

Methods   
__init__
__insertgif
append
graphics
grepfile
loadfile
movie
picture
run
silentrun
write
  __init__ 
__init__ (
        self,
        logfile,
        removepath=' ',
        )

Clean up logfile, create a new one with header.

Exceptions   
'error in logfile name; must contain .v suffix'
  __insertgif 
__insertgif ( self,  giffile_with_full_path )

  append 
append (
        self,
        file,
        maxlines=0,
        )

Append a file or a list of files to the logfile.

  graphics 
graphics (
        self,
        program,
        options='',
        )

Run e.g. graphics program if the environment variable BATCH_REGRESSION is not set.

  grepfile 
grepfile (
        self,
        regex,
        file,
        return_lineinfo=1,
        )

Return a text consisting of the lines matching regex (regex can be string or list of strings, and return_lineinfo is true if each matched line is prefixed with the filename and the line file as a list of lines for text processing).

  loadfile 
loadfile ( self,  file )

Return a file as a list of lines for text processing.

  movie 
movie ( self,  list_of_psfiles )

Insert HTML commands for an animated gif picture.

  picture 
picture ( self,  psfile )

Insert HTML commands for a gif picture.

  run 
run (
        self,
        program,
        options='',
        inputfile='',
        )

Run program, store output on logfile.

  silentrun 
silentrun (
        self,
        program,
        options='',
        )

Run program without storing output on logfile.

  write 
write ( self,  text )

Write message to logfile.


Table of Contents

This document was automatically generated on Sun Mar 14 15:31:01 2004 by HappyDoc version 2.1