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