Loading tests/unit/gitlab_ci/pre_commit_run/fixtures.py +1 −3 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ class Repo: return Sha(proc.stdout.decode().strip()) def setup_fixture_repo(repo: Repo) -> dict[Ref, Branch]: def setup_fixture_repo(repo: Repo) -> None: r""" Create a sample git repository as a test fixture Loading Loading @@ -157,8 +157,6 @@ def setup_fixture_repo(repo: Repo) -> dict[Ref, Branch]: orphan = Branch(repo, "orphan", create_commit(repo)) orphan.head = create_commit_path(repo, orphan.root, 5) return {b.name: b for b in (main, fork, lca, orphan)} def create_commit_path(repo: Repo, source: Sha, number: int) -> Sha: """ Loading tests/unit/gitlab_ci/pre_commit_run/tests.py +1 −5 Original line number Diff line number Diff line Loading @@ -22,10 +22,7 @@ import subprocess import unittest from pathlib import Path from typing import Iterable from typing import Mapping from .fixtures import Branch from .fixtures import Ref from .fixtures import Repo from .fixtures import setup_fixture_repo Loading @@ -43,7 +40,6 @@ class PreCommitRunTests(unittest.TestCase): repo: Repo test_repo: Repo branches: Mapping[Ref, Branch] @classmethod def setUpClass(cls) -> None: Loading @@ -51,7 +47,7 @@ class PreCommitRunTests(unittest.TestCase): Prepare fixtures for the entire test case """ cls.repo = Repo(init=True) cls.branches = setup_fixture_repo(cls.repo) setup_fixture_repo(cls.repo) @classmethod def tearDownClass(cls) -> None: Loading Loading
tests/unit/gitlab_ci/pre_commit_run/fixtures.py +1 −3 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ class Repo: return Sha(proc.stdout.decode().strip()) def setup_fixture_repo(repo: Repo) -> dict[Ref, Branch]: def setup_fixture_repo(repo: Repo) -> None: r""" Create a sample git repository as a test fixture Loading Loading @@ -157,8 +157,6 @@ def setup_fixture_repo(repo: Repo) -> dict[Ref, Branch]: orphan = Branch(repo, "orphan", create_commit(repo)) orphan.head = create_commit_path(repo, orphan.root, 5) return {b.name: b for b in (main, fork, lca, orphan)} def create_commit_path(repo: Repo, source: Sha, number: int) -> Sha: """ Loading
tests/unit/gitlab_ci/pre_commit_run/tests.py +1 −5 Original line number Diff line number Diff line Loading @@ -22,10 +22,7 @@ import subprocess import unittest from pathlib import Path from typing import Iterable from typing import Mapping from .fixtures import Branch from .fixtures import Ref from .fixtures import Repo from .fixtures import setup_fixture_repo Loading @@ -43,7 +40,6 @@ class PreCommitRunTests(unittest.TestCase): repo: Repo test_repo: Repo branches: Mapping[Ref, Branch] @classmethod def setUpClass(cls) -> None: Loading @@ -51,7 +47,7 @@ class PreCommitRunTests(unittest.TestCase): Prepare fixtures for the entire test case """ cls.repo = Repo(init=True) cls.branches = setup_fixture_repo(cls.repo) setup_fixture_repo(cls.repo) @classmethod def tearDownClass(cls) -> None: Loading