Skip to content

Commit

Permalink
Revert "Fix two tests related to darwin and recent git"
Browse files Browse the repository at this point in the history
  • Loading branch information
liaiss committed Dec 18, 2023
1 parent 58af6c4 commit abf72fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions src/e3/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,22 +147,16 @@ def git_cmd(
)
return p

def init(
self,
url: str | None = None,
remote: str | None = "origin",
initial_branch: str = "master",
) -> None:
def init(self, url: str | None = None, remote: str | None = "origin") -> None:
"""Initialize a new Git repository and configure the remote.
:param url: url of the remote repository, if None create a local git
repository
:param remote: name of the remote to create
:param initial_branch: name of the initial branch (default is master)
:raise: GitError
"""
e3.fs.mkdir(self.working_tree)
self.git_cmd(["init", "-q", f"--initial-branch={initial_branch}"])
self.git_cmd(["init", "-q"])

# Git version 1.8.3.1 might crash when calling "git stash" when
# .git/logs/refs is not created. Recent versions of git do not
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_e3/os/process/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def run_test():
e.restore()


@pytest.mark.skipif(not sys.platform.startswith("linux"), reason="A linux test")
@pytest.mark.skipif(sys.platform == "win32", reason="A linux test")
def test_rlimit_ctrl_c():
"""Test rlimit CTRL-C.
Expand Down Expand Up @@ -193,7 +193,7 @@ def test_rlimit_ctrl_c():
assert int(end - start) < 30, f"CTRL-C failed: take {int(end - start)} seconds"


@pytest.mark.skipif(not sys.platform.startswith("linux"), reason="A linux test")
@pytest.mark.skipif(sys.platform == "win32", reason="A linux test")
def test_rlimit_foreground_option():
"""Test rlimit --foreground.
Expand Down

0 comments on commit abf72fb

Please sign in to comment.