Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3dd2acd

Browse filesBrowse files
committed
test(GitSync.object) benchmark
1 parent 757274a commit 3dd2acd
Copy full SHA for 3dd2acd

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎tests/sync/test_git.py

Copy file name to clipboardExpand all lines: tests/sync/test_git.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import typing as t
99

1010
import pytest
11+
from pytest_codspeed.plugin import BenchmarkFixture
1112
from pytest_mock import MockerFixture
1213

1314
from libvcs import exc
@@ -30,7 +31,6 @@
3031
ProjectTestFactoryRemoteLazyExpected = t.Callable[..., dict[str, GitRemote]]
3132

3233

33-
@pytest.mark.benchmark
3434
@pytest.mark.parametrize(
3535
# Postpone evaluation of options so fixture variables can interpolate
3636
("constructor", "lazy_constructor_options"),
@@ -57,6 +57,7 @@ def test_repo_git_obtain_initial_commit_repo(
5757
tmp_path: pathlib.Path,
5858
constructor: ProjectTestFactory,
5959
lazy_constructor_options: ProjectTestFactoryLazyKwargs,
60+
benchmark: BenchmarkFixture,
6061
) -> None:
6162
"""Initial commit repos return 'initial'.
6263
@@ -70,7 +71,7 @@ def test_repo_git_obtain_initial_commit_repo(
7071
bare_dir = tmp_path / repo_name
7172
git_repo: GitSync = constructor(**lazy_constructor_options(**locals()))
7273

73-
git_repo.obtain()
74+
benchmark(lambda: git_repo.obtain())
7475
assert git_repo.get_revision() == "initial"
7576

7677

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.