def run(path, pattern): Vows.gather(path, pattern) result = Vows.ensure(VowsDefaultReporter.handle_success, VowsDefaultReporter.handle_error) reporter = VowsDefaultReporter(result) reporter.pretty_print() return result, reporter
def run(path, pattern, verbosity, progress): from pyvows.core import Vows from pyvows.reporting import VowsDefaultReporter Vows.gather(path, pattern) handle_success = progress and VowsDefaultReporter.handle_success or None handle_error = progress and VowsDefaultReporter.handle_error or None result = Vows.ensure(handle_success, handle_error) reporter = VowsDefaultReporter(result, verbosity) return result, reporter
def run(path, pattern, verbosity, progress): # they need to be imported here, else the no-color option wont work from pyvows.core import Vows from pyvows.reporting import VowsDefaultReporter Vows.gather(path, pattern) handle_success = progress and VowsDefaultReporter.handle_success or None handle_error = progress and VowsDefaultReporter.handle_error or None result = Vows.ensure(handle_success, handle_error) reporter = VowsDefaultReporter(result, verbosity) return result, reporter
def run(path, pattern, verbosity, show_progress, exclusion_patterns=None, inclusion_patterns=None, capture_output=False): # FIXME: Add Docstring # This calls Vows.run(), which then calls VowsRunner.run() # needs to be imported here, else the no-color option won't work from pyvows.core import Vows if exclusion_patterns: Vows.exclude(exclusion_patterns) if inclusion_patterns: Vows.include(inclusion_patterns) Vows.collect(path, pattern) on_success = show_progress and VowsDefaultReporter.on_vow_success or None on_error = show_progress and VowsDefaultReporter.on_vow_error or None result = Vows.run(on_success, on_error, capture_output) return result
def run(path, pattern, verbosity, show_progress, exclusion_patterns=None): # FIXME: Add Docstring # This calls Vows.run(), which then calls VowsRunner.run() # needs to be imported here, else the no-color option won't work from pyvows.core import Vows if exclusion_patterns: Vows.exclude(exclusion_patterns) Vows.collect(path, pattern) on_success = show_progress and VowsDefaultReporter.on_vow_success or None on_error = show_progress and VowsDefaultReporter.on_vow_error or None result = Vows.run(on_success, on_error) return result