예제 #1
0
def compileScenic(code, removeIndentation=True):
    if removeIndentation:
        # to allow indenting code to line up with test function
        code = inspect.cleandoc(code)
    checkVeneerIsInactive()
    scenario = scenarioFromString(code)
    checkVeneerIsInactive()
    return scenario
예제 #2
0
 def fromScenicCode(cls, code, maxIterations=None, ignoredProperties=None):
     """As above, but given a Scenic program as a string."""
     scenario = scenic.scenarioFromString(code)
     return cls(scenario,
                maxIterations=maxIterations,
                ignoredProperties=ignoredProperties)