def teardown_test_environment(self, **kwargs): for path in self.static_files_iterator(): jslint_output = check_output([ self.intepreter, self.runner, self.implementation, relpath(path) ]) self.output.write(jslint_output)
def teardown_test_environment(self, **kwargs): files = [relpath(path) for path in self.static_files_iterator()] if self.to_file: fmt = 'lint-xml' else: fmt = 'text' csslint_output = check_output([self.intepreter, self.implementation, '--format=%s' % fmt] + files) self.output.write(csslint_output)
def teardown_test_environment(self, **kwargs): files = [relpath(path) for path in self.static_files_iterator()] if self.to_file: fmt = "lint-xml" else: fmt = "text" csslint_output = check_output([self.intepreter, self.implementation, "--format=%s" % fmt] + files) self.output.write(csslint_output)
def teardown_test_environment(self, **kwargs): report_output = check_output( ['sloccount', "--duplicates", "--wide", "--details"] + self.locations) if self.with_migrations: self.output.write(report_output) else: for line in report_output.splitlines(): if '/migrations/' in line: continue self.output.write(line) self.output.write('\n')
def teardown_test_environment(self, **kwargs): for test in self.test_files_iterator(): sys.stdout.write('Executing: %s\n' % test) app_dir = os.path.dirname(os.path.dirname(test)) manage_dir = os.path.abspath(os.path.join(app_dir, '..')) with PushDir(manage_dir): testem_output = check_output( ['testem', 'ci', '-f', test]) if self.to_files: app_name = os.path.basename(app_dir) output = codecs.open(os.path.join(self.output_dir, "testem-%s.tap" % app_name), 'w', 'utf-8') else: output = sys.stdout output.write(testem_output.decode('utf-8'))
def teardown_test_environment(self, **kwargs): locations = get_apps_locations(self.test_labels, self.test_all) report_output = check_output( ['sloccount', "--duplicates", "--wide", "--details"] + locations) report_output = report_output.decode('utf-8') if self.with_migrations: self.output.write(report_output.decode('utf-8')) else: for line in report_output.splitlines(): if '/migrations/' in line: continue self.output.write(line) self.output.write('\n')
def teardown_test_environment(self, **kwargs): fmt = 'text' if self.to_file: fmt = 'xml' if self.to_file: self.output.write('<?xml version=\"1.0\" encoding=\"utf-8\"?><jslint>') for path in self.static_files_iterator(): jslint_output = check_output( [self.interpreter, self.runner, self.implementation, relpath(path), fmt]) self.output.write(jslint_output) if self.to_file: self.output.write('</jslint>');
def teardown_test_environment(self, **kwargs): fmt = 'text' if self.to_file: fmt = 'xml' if self.to_file: self.output.write('<?xml version=\"1.0\" encoding=\"utf-8\"?><jslint>') for path in self.static_files_iterator(): jslint_output = check_output( [self.interpreter, self.runner, self.implementation, path, fmt]) self.output.write(jslint_output.decode('utf-8')) if self.to_file: self.output.write('</jslint>');
def teardown_test_environment(self, **kwargs): report_output = check_output( ['sloccount', "--wide", "--details"] + self.locations) self.output.write(report_output)
def test_output_to_ls_inxesistent_file_or_dir(self): #test example of this gist: https://gist.github.com/839684 from subprocess import STDOUT self.assertEquals('ls: non_existent_file: No such file or directory\n', check_output(["/bin/sh", "-c", "ls -l non_existent_file ; exit 0"], stderr=STDOUT))
def test_output_to_ls(self): #test example of this gist: https://gist.github.com/839684 self.assertEquals('/dev/null\n', check_output(["ls","/dev/null"]))
def teardown_test_environment(self, **kwargs): for path in self.static_files_iterator(): jslint_output = check_output( [self.intepreter, self.runner, self.implementation, relpath(path)]) self.output.write(jslint_output)