Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rehandalal committed Jul 30, 2021
1 parent a329862 commit 2536b3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ def test_run_process_error(self, project):
c = Config(project.path)
r = Runner(c.cwd, enable_git=True)
result, message = r.run_process(c.actions.get("lint"))
assert result.is_error

assert result.is_error
assert len(r.files) == 10000
assert message == (
"#{bright}Linting ............................................................. "
Expand All @@ -428,8 +428,9 @@ def test_run_process_skips_deleted(self, project):

c = Config(project.path)
r = Runner(c.cwd, enable_git=True)
r.run_process(c.actions.get("lint"))
result, message = r.run_process(c.actions.get("lint"))

assert result.is_skip
assert len(r.files) == 0

def test_action_no_run(self, tmpdir):
Expand Down Expand Up @@ -639,5 +640,6 @@ def test_skips_staged_file_deleted_in_working_tree_with_include_unstaged(self, p
r = Runner(c.cwd, enable_git=True, include_unstaged=True)
result, message = r.run_process(c.actions.get("lint"))

assert len(r.files) == 0
assert result.is_skip
assert not project.exists("pass.txt")
2 changes: 1 addition & 1 deletion therapist/utils/git/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class Status(object):
def __init__(self, status):
matches = re.search(r"^((?:[MADRCU ?!]){2}) (.+?)(?: -> (.+?))?$", status)
matches = re.search(r"^([MADRCU ?!]{2}) (.+?)(?: -> (.+?))?$", status)
self.x = matches[1][0]
self.y = matches[1][1]
self.path = matches[3] if matches[3] else matches[2]
Expand Down

0 comments on commit 2536b3f

Please sign in to comment.