def main(): if len(sys.argv) == 1: # read fixture from stdin fixtures = {'stdin': json.load(sys.stdin)} else: # load fixtures from specified file or dir fixtures = testutils.get_tests_from_file_or_dir(sys.argv[1]) for filename, tests in list(fixtures.items()): for testname, testdata in list(tests.items()): if len(sys.argv) < 3 or testname == sys.argv[2]: print("Testing: %s %s" % (filename, testname)) # testutils.check_state_test(testdata) test_transaction(filename, testname, testdata)
def main(): if len(sys.argv) == 1: # read fixture from stdin fixtures = {'stdin': json.load(sys.stdin)} else: # load fixtures from specified file or dir try: fixtures = testutils.get_tests_from_file_or_dir(sys.argv[1]) except BaseException: fixtures = {'stdin': json.loads(sys.argv[1])} for filename, tests in list(fixtures.items()): for testname, testdata in list(tests.items()): if len(sys.argv) < 3 or testname == sys.argv[2]: print("Testing: %s %s" % (filename, testname)) testutils.check_vm_test(testdata)
def main(): assert len(sys.argv) >= 2, "Please specify file or dir name" fixtures = testutils.get_tests_from_file_or_dir(sys.argv[1]) if len(sys.argv) >= 3: for filename, tests in list(fixtures.items()): for testname, testdata in list(tests.items()): if testname == sys.argv[2]: print("Testing: %s %s" % (filename, testname)) run_block_test(testdata, get_config_overrides(filename, testname)) else: for filename, tests in list(fixtures.items()): for testname, testdata in list(tests.items()): if (filename.split('/')[-1], testname) not in skips: print("Testing: %s %s" % (filename, testname)) run_block_test(testdata, get_config_overrides(filename, testname))