def main(): with open("testfiles/parsing/Valid.txt", "r") as testfile: blueprint = TestCase.parse_syntax(testfile) if blueprint is not None: tc = TestCase(blueprint) dr = Driver(tc) dr.execute()
#!/usr/bin/python3 # Honestly, making "Driver" a class was worth it # just so we have this one called "DriverDriver.py" from Driver import Driver from TestCase import TestCase import sys with open(sys.argv[1], "r") as testfile: blueprint = TestCase.parse_syntax(testfile) if blueprint is not None: tc = TestCase(blueprint) dr = Driver(tc) dr.execute() elif blueprint is None: print("Invalid blueprint")
#!/usr/bin/python3 from Driver import Driver from TestCase import TestCase import sys filename = sys.argv[1] blueprint = TestCase.parse_syntax(filename) if blueprint is not None: tc = TestCase(blueprint) dr = Driver(tc) dr.execute() elif blueprint is None: print("Invalid blueprint") else: print("How the hell did you end up here?")
def main(): with open(sys.argv[1]) as testfile: fieldmap = TestCase.parse_syntax(testfile) if type(fieldmap) is not None: print(fieldmap) print("from %s" % sys.argv[1])