def create_repo(): os.chdir(TEMP_DIR) try: check_output(["hg", "init"], stderr=STDOUT) return True except (OSError, CalledProcessError): return False
def successfully_commit_files(file_names, commit="initial_commit"): os.chdir(TEMP_DIR) try: check_output(["hg", "add"] + file_names, stderr=STDOUT) check_output(["hg", "commit", "-m", commit], stderr=STDOUT) return True except (OSError, CalledProcessError): return False
def test_list_fixes(self): fixes = check_output(["python", PEP8RADIUS, "--list-fixes"]) afixes = check_output(["autopep8", "--list-fixes"]) self.assertEqual(fixes, afixes)
def test_version_number(self): version_ = check_output(["python", PEP8RADIUS, "--version"]) version_ = version_.decode("utf-8").strip() self.assertEqual(version_, version)
def test_list_fixes(self): fixes = check_output(['python', PEP8RADIUS, '--list-fixes']) afixes = check_output(['autopep8', '--list-fixes']) self.assertEqual(fixes, afixes)
def test_version_number(self): version_ = check_output(['python', PEP8RADIUS, '--version']) version_ = version_.decode('utf-8').strip() self.assertEqual(version_, version)