def main(argv): options, parser = cli.get_cli_args(argv) valid_paths = set([test.source.path for test in testing.load_all()]) listed_passing = testing.Suite.from_file('data/passing.txt') listed_failing = testing.Suite.from_file('data/failing.txt') valid_passing = _remove_deleted_tests(listed_passing, valid_paths) valid_failing = _remove_deleted_tests(listed_failing, valid_paths) try: print "Removing deleted tests from your history...\n" valid_passing[0].save() print "Pruned %d bad paths from passing test list." % valid_passing[1] valid_failing[0].save() print "Pruned %d bad paths from failing test list." % valid_failing[1] if options.prune_last or options.prune_all: pruned_from_log = _prune_last_run(valid_paths) print "\nPruned %d items from the run log." % pruned_from_log if options.prune_suites or options.prune_all: print "\n", for suite, num_removed in _prune_suites(valid_paths): print "Pruned %d bad paths from suite %s (%s)." % ( num_removed, suite.name, suite.filename ) except errors.YunoError as e: print e.for_console() _print_interrupt_warning() except KeyboardInterrupt: _print_interrupt_warning() except BaseException: _print_interrupt_warning() print "\nReason below:" + ('-' * 80) raise
def main(argv): args, parser = cli.get_cli_args(argv) valid_paths = set([test.source.path for test in testing.load_all()]) listed_passing = testing.Suite.from_file('data/passing.txt') listed_failing = testing.Suite.from_file('data/failing.txt') valid_passing = _remove_deleted_tests(listed_passing, valid_paths) valid_failing = _remove_deleted_tests(listed_failing, valid_paths) try: print("Removing deleted tests from your history...\n") valid_passing[0].save() print("Pruned %d bad paths from passing test list." % valid_passing[1]) valid_failing[0].save() print("Pruned %d bad paths from failing test list." % valid_failing[1]) if args.prune_last or args.prune_all: pruned_from_log = _prune_last_run(valid_paths) print("\nPruned %d items from the run log." % pruned_from_log) if args.prune_suites or args.prune_all: print("") for suite, num_removed in _prune_suites(valid_paths): print("Pruned %d bad paths from suite %s (%s)." % (num_removed, suite.name, suite.filename)) except errors.YunoError as e: print(e.for_console()) print(text.PRUNE_INTERRUPTED) except KeyboardInterrupt: print(text.PRUNE_INTERRUPTED) except BaseException: print(text.PRUNE_INTERRUPTED) print("\nReason below:" + ('-' * 80)) raise
def _delete_assembly(): asm_tests = testing.load_all() for test in asm_tests: os.remove(posixpath.join(settings.test_folder, test.source.path))