phystricks
Classes | Functions
TestRecall Namespace Reference

Classes

class  Point
 
class  TikzComparison
 contains the comparison between two 'tikz' files More...
 
class  TikzDecomposition
 Represent a 'pstricks' file decomposed as a list of points and text between points. More...
 

Functions

def pstricks_files_iterator (directory)
 
def wrong_file_list (pstricks_directory, recall_directory)
 
def split_for_positions (text, positions)
 split text on basis of the given index More...
 
def file_to_tikz_decomposition (filename)
 
def comparison (f1, f2, epsilon, verbose=False)
 return a comparison of files 'f1' and 'f2' which are assumed to be auto generated '.pstricks' files. More...
 
def check_pictures (pstricks_directory, recall_directory, verbose=True, epsilon=0.001)
 check the pictures against their 'recall' file in a directory. More...
 

Function Documentation

def TestRecall.check_pictures (   pstricks_directory,
  recall_directory,
  verbose = True,
  epsilon = 0.001 
)

check the pictures against their 'recall' file in a directory.

Parameters
pstricks_directorythe directory which will be parsed in search for '.pstricks' files.
recall_directorythe directory in which the corresponding 'recall' files will be searched.
verboseif True, print the name of all the files whose corresponding 'recall' is not exactly the same. If False, print only the ones for which a point is significantly moved or a text outside points coordinates is changed.
epsilonis the tolerance for point move. When the coordinates of a point did not change by more than epsilon, the files are considered as "small point move".
def TestRecall.comparison (   f1,
  f2,
  epsilon,
  verbose = False 
)

return a comparison of files 'f1' and 'f2' which are assumed to be auto generated '.pstricks' files.

Parameters
f1,f2file names.
Returns
(TikzComparison) a small summary of the comparison.
def TestRecall.file_to_tikz_decomposition (   filename)
def TestRecall.pstricks_files_iterator (   directory)
def TestRecall.split_for_positions (   text,
  positions 
)

split text on basis of the given index

Parameters
texta string to be spliced a list of integers.

Iterate over strings that are the parts of text between the given positions. Two border cases :

  • the part before the first given index
  • the part after the last one.y They are part of the iterator.
def TestRecall.wrong_file_list (   pstricks_directory,
  recall_directory 
)
return a tuple of lists
- the list of missing 'recall'
- the list of 'recall/pstricks' which do not match

parameters :
- `pstricks_directory` : the directory in which the 'pstricks' files are.
                    This is also the directory that we are going to parse.

- `recall_directory` : the directory in which are the recall files.