Skip to content

Commit 111e4f5

Browse files
committed
make format
1 parent ec8b22c commit 111e4f5

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

src/mxdev/tests/conftest.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from .utils import Process
2+
13
import os
24
import pytest
3-
from .utils import Process
45

56

67
@pytest.fixture
@@ -41,15 +42,18 @@ def git_allow_file_protocol():
4142
This is needed for the submodule to be added from a local path
4243
"""
4344
from .utils import GitRepo
44-
45+
4546
shell = Process()
46-
file_allow = shell.check_call("git config --global --get protocol.file.allow")[0].decode("utf8").strip()
47+
file_allow = (
48+
shell.check_call("git config --global --get protocol.file.allow")[0]
49+
.decode("utf8")
50+
.strip()
51+
)
4752
shell.check_call(f"git config --global protocol.file.allow always")
4853
yield file_allow
4954
shell.check_call(f"git config --global protocol.file.allow {file_allow}")
5055

5156

52-
5357
@pytest.fixture
5458
def develop(src):
5559
from mxdev.tests.utils import MockDevelop

src/mxdev/tests/test_git_submodules.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ def test_checkout_with_two_submodules(mkgitrepo, src, git_allow_file_protocol):
102102
@pytest.mark.skipif(
103103
condition=os.name == "nt", reason="submodules seem not to work on windows"
104104
)
105-
def test_checkout_with_two_submodules_recursive(mkgitrepo, src, git_allow_file_protocol):
105+
def test_checkout_with_two_submodules_recursive(
106+
mkgitrepo, src, git_allow_file_protocol
107+
):
106108
"""
107109
Tests the checkout of a module 'egg' with a submodule 'submodule_a'
108110
and a submodule 'submodule_b' in it.
@@ -297,7 +299,9 @@ def test_checkout_with_submodules_option_never(mkgitrepo, src, git_allow_file_pr
297299
@pytest.mark.skipif(
298300
condition=os.name == "nt", reason="submodules seem not to work on windows"
299301
)
300-
def test_checkout_with_submodules_option_never_source_always(mkgitrepo, src, git_allow_file_protocol):
302+
def test_checkout_with_submodules_option_never_source_always(
303+
mkgitrepo, src, git_allow_file_protocol
304+
):
301305
"""
302306
Tests the checkout of a module 'egg' with a submodule 'submodule_a' in it
303307
and a module 'egg2' with the same submodule, initializing only the submodule
@@ -358,7 +362,9 @@ def test_checkout_with_submodules_option_never_source_always(mkgitrepo, src, git
358362
@pytest.mark.skipif(
359363
condition=os.name == "nt", reason="submodules seem not to work on windows"
360364
)
361-
def test_checkout_with_submodules_option_always_source_never(mkgitrepo, src, git_allow_file_protocol):
365+
def test_checkout_with_submodules_option_always_source_never(
366+
mkgitrepo, src, git_allow_file_protocol
367+
):
362368
"""
363369
Tests the checkout of a module 'egg' with a submodule 'submodule_a' in it
364370
and a module 'egg2' with the same submodule, not initializing the submodule
@@ -482,7 +488,9 @@ def test_update_with_submodule_checkout(mkgitrepo, src, git_allow_file_protocol)
482488
@pytest.mark.skipif(
483489
condition=os.name == "nt", reason="submodules seem not to work on windows"
484490
)
485-
def test_update_with_submodule_dont_update_previous_submodules(mkgitrepo, src, git_allow_file_protocol):
491+
def test_update_with_submodule_dont_update_previous_submodules(
492+
mkgitrepo, src, git_allow_file_protocol
493+
):
486494
"""
487495
Tests the checkout of a module 'egg' with a submodule 'submodule_a' in it.
488496
Commits changes in the detached submodule, and checks update didn't break

src/mxdev/tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def add_file(self, fname, msg=None):
167167
def add_submodule(self, submodule: "GitRepo", submodule_name: str):
168168
assert isinstance(submodule, GitRepo)
169169
assert isinstance(submodule_name, str)
170-
170+
171171
self(f"git submodule add {submodule.url}")
172172
self("git add .gitmodules")
173173
self(f"git add {submodule_name}")

0 commit comments

Comments
 (0)