def __init__(self, decorated=None):
     """Initialize the DebuggingConsumer."""
     self.linenum = 0
     if decorated is None:
         decorated = ParserSupport.AbstractConsumer()
     self.decorated = decorated
     self._prev_attr = None
 def __init__(self, decorated=None):
     self.linenum = 0
     if decorated is None:
         decorated = ParserSupport.AbstractConsumer()
     self.decorated = decorated
     self._prev_attr = None
Beispiel #3
0
                      filter= "F > /etc/passwd'")
        assert False, "Attempted output redirection not caught!"
    except ValueError, e:
        assert str(e) == "Rejecting suspicious argument for filter"
        #Good


### _Scanner

print "Running tests on _Scanner"

scanner = NCBIStandalone._Scanner()
for test in all_tests:
    print "*" * 50, "TESTING %s" % test
    datafile = os.path.join("Blast", test)
    scanner.feed(open(datafile), ParserSupport.AbstractConsumer())

for test in detailed_tests:
    print "*" * 50, "TESTING %s" % test
    datafile = os.path.join("Blast", test)
    scanner.feed(open(datafile), ParserSupport.TaggingConsumer())

### BlastParser

print "Running tests on BlastParser"

parser = NCBIStandalone.BlastParser()
pb_parser = NCBIStandalone.PSIBlastParser()
for test in all_tests:
    print "*" * 50, "TESTING %s" % test
    datafile = os.path.join("Blast", test)