Пример #1
0
 def create_repo():
     os.chdir(TEMP_DIR)
     try:
         check_output(["hg", "init"], stderr=STDOUT)
         return True
     except (OSError, CalledProcessError):
         return False
Пример #2
0
 def create_repo():
     os.chdir(TEMP_DIR)
     try:
         check_output(["hg", "init"], stderr=STDOUT)
         return True
     except (OSError, CalledProcessError):
         return False
Пример #3
0
 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
Пример #4
0
 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
Пример #5
0
 def test_list_fixes(self):
     fixes = check_output(["python", PEP8RADIUS, "--list-fixes"])
     afixes = check_output(["autopep8", "--list-fixes"])
     self.assertEqual(fixes, afixes)
Пример #6
0
 def test_version_number(self):
     version_ = check_output(["python", PEP8RADIUS, "--version"])
     version_ = version_.decode("utf-8").strip()
     self.assertEqual(version_, version)
Пример #7
0
 def test_list_fixes(self):
     fixes = check_output(['python', PEP8RADIUS, '--list-fixes'])
     afixes = check_output(['autopep8', '--list-fixes'])
     self.assertEqual(fixes, afixes)
Пример #8
0
 def test_version_number(self):
     version_ = check_output(['python', PEP8RADIUS, '--version'])
     version_ = version_.decode('utf-8').strip()
     self.assertEqual(version_, version)