Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
_SpoofOut Class Reference

Public Member Functions

def __init__
 
def write
 
def get
 
def clear
 
def flush
 

Data Fields

 buf
 

Detailed Description

Definition at line 370 of file doctest.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 371 of file doctest.py.

References _SpoofOut.clear().

372  def __init__(self):
self.clear()

Member Function Documentation

def clear (   self)

Definition at line 387 of file doctest.py.

388  def clear(self):
389  self.buf = []
390  if hasattr(self, "softspace"):
del self.softspace
def flush (   self)

Definition at line 391 of file doctest.py.

392  def flush(self):
393  # JPython calls flush
394  pass
395 
396 # Display some tag-and-msg pairs nicely, keeping the tag and its msg
397 # on the same line when that makes sense.
def get (   self)

Definition at line 375 of file doctest.py.

References _SpoofOut.buf, dospath.join(), StringIO.softspace, and AbstractFormatter.softspace.

376  def get(self):
377  guts = "".join(self.buf)
378  # If anything at all was written, make sure there's a trailing
379  # newline. There's no way for the expected output to indicate
380  # that a trailing newline is missing.
381  if guts and not guts.endswith("\n"):
382  guts = guts + "\n"
383  # Prevent softspace from screwing up the next test case, in
384  # case they used print with a trailing comma in an example.
385  if hasattr(self, "softspace"):
386  del self.softspace
return guts
def write (   self,
  s 
)

Definition at line 373 of file doctest.py.

374  def write(self, s):
self.buf.append(s)

Field Documentation

buf

Definition at line 388 of file doctest.py.


The documentation for this class was generated from the following file: