def test_style_conformance(self): """Check the easyconfigs for style""" # all available easyconfig files easyconfigs_path = get_paths_for("easyconfigs")[0] specs = glob.glob('%s/*/*/*.eb' % easyconfigs_path) specs = sorted(specs) result = check_easyconfigs_style(specs) self.assertEqual( result, 0, "Found code style errors (and/or warnings): %s" % result)
def test_style_conformance(self): """Check the easyconfigs for style""" if not ('pycodestyle' in sys.modules or 'pep8' in sys.modules): print("Skipping style checks (no pycodestyle or pep8 available)") return # all available easyconfig files test_easyconfigs_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'easyconfigs', 'test_ecs') specs = glob.glob('%s/*.eb' % test_easyconfigs_path) specs = sorted(specs) result = check_easyconfigs_style(specs) self.assertEqual(result, 0, "No code style errors (and/or warnings) found.")
def test_style_conformance(self): """Check the easyconfigs for style""" if not ('pycodestyle' in sys.modules or 'pep8' in sys.modules): print "Skipping style checks (no pycodestyle or pep8 available)" return # all available easyconfig files test_easyconfigs_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'easyconfigs', 'test_ecs') specs = glob.glob('%s/*.eb' % test_easyconfigs_path) specs = sorted(specs) result = check_easyconfigs_style(specs) self.assertEqual(result, 0, "No code style errors (and/or warnings) found.")
def test_style_conformance(self): """Check the easyconfigs for style""" if 'pep8' not in sys.modules: print "Skipping style checks (no pep8 available)" return # all available easyconfig files easyconfigs_path = get_paths_for("easyconfigs")[0] specs = glob.glob('%s/*/*/*.eb' % easyconfigs_path) specs = sorted(specs) result = check_easyconfigs_style(specs) self.assertEqual(result, 0, "Found code style errors (and/or warnings): %s" % result)
def test_style_conformance(self): """Check the easyconfigs for style""" if 'pep8' not in sys.modules: print("Skipping style checks (no pep8 available)") return # all available easyconfig files easyconfigs_path = get_paths_for("easyconfigs")[0] specs = glob.glob('%s/*/*/*.eb' % easyconfigs_path) specs = sorted(specs) result = check_easyconfigs_style(specs) self.assertEqual( result, 0, "Found code style errors (and/or warnings): %s" % result)
def test_style_conformance(self): """Check the easyconfigs for style""" # all available easyconfig files easyconfigs_path = get_paths_for("easyconfigs")[0] specs = glob.glob('%s/*/*/*.eb' % easyconfigs_path) specs = sorted(specs) self.mock_stderr(True) self.mock_stdout(True) result = check_easyconfigs_style(specs) stderr, stdout = self.get_stderr(), self.get_stdout() self.mock_stderr(False) self.mock_stdout(False) error_msg = '\n'.join([ "There shouldn't be any code style errors (and/or warnings), found %d:" % result, stdout, stderr, ]) self.assertEqual(result, 0, error_msg)