Skip to content

Commit

Permalink
Use git_commit_file() elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb-MCaw committed Oct 28, 2024
1 parent b3528dd commit d998f14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
7 changes: 2 additions & 5 deletions testsuite/tests/pin/branch/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

from drivers.alr import run_alr, alr_pin, alr_unpin, init_local_crate
from drivers.asserts import assert_match
from drivers.helpers import git_branch, init_git_repo
from e3.os.fs import touch
from drivers.helpers import git_branch, git_commit_file, init_git_repo

import re
import os
Expand All @@ -21,9 +20,7 @@

# Create a second branch and commit for testing
subprocess.run(["git", "checkout", "-b", "devel"]).check_returncode()
touch("telltale")
subprocess.run(["git", "add", "telltale"]).check_returncode()
subprocess.run(["git", "commit", "-m", "branching"]).check_returncode()
git_commit_file(commit_name="branching", path="telltale", content="")
os.chdir("..")

# Now pin to the branch, and verify the telltale file exists in the checkout
Expand Down
8 changes: 2 additions & 6 deletions testsuite/tests/pin/conflicting-remote/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

from drivers.alr import run_alr, alr_pin, alr_unpin, init_local_crate
from drivers.asserts import assert_eq, assert_match
from drivers.helpers import git_blast, git_head, init_git_repo
from e3.os.fs import touch
from drivers.helpers import git_blast, git_commit_file, git_head, init_git_repo
from re import escape

import re
Expand All @@ -23,10 +22,7 @@

# Create a second branch and commit for testing
subprocess.run(["git", "checkout", "-b", "devel"]).check_returncode()
touch("x")
subprocess.run(["git", "add", "x"]).check_returncode()
subprocess.run(["git", "commit", "-m", "branching"]).check_returncode()
head2 = git_head()
head2 = git_commit_file(commit_name="branching", path="x", content="")
os.chdir("..")


Expand Down

0 comments on commit d998f14

Please sign in to comment.