コード例 #1
0
def removeTitleHeaders(inputString):
    returnString = extract(inputString)
    try:
        assert (returnString == "Leftover")
    except AssertionError:
        print("Title Headers removal Failed")
    else:
        print("Title Headers removal Passed")
コード例 #2
0
def removeStarHeaders(inputString):
    returnString = extract(inputString)
    try:
        assert (returnString == "Bob")
    except AssertionError:
        print("Star Headers removal Failed")
    else:
        print("Star Headers removal Passed")
コード例 #3
0
def testEmptyVariable(inputString):
    returnString = extract(inputString)
    try:
        assert (returnString == "")
    except AssertionError:
        print("Empty Variable String Failed")
    else:
        print("Empty Variable String Passed")
コード例 #4
0
def testEquationRemoval(inputString):
    returnString = extract(inputString)
    
    try:
        assert(returnString == "in an open population, with no additional mortality associated with infection (such that the population size remains constant and R is not modelled explicitly).")
    except AssertionError:
        print("Equation Removal Test Failed")
    else:
        print("Equation Removal Test Passed")
コード例 #5
0
def testVariableCapitalization(inputString):
    
    returnString = extract(inputString)
    
    try:
        assert(returnString == "There are no birth of natural death processes in this model. Parameters are: Beta rate of infection Delta rate at which symptoms")
    except AssertionError:
        print("Variable Capitalization Test Failed")
    else:
        print("Variable Capitalization Test Passed")