Skip to content

Commit

Permalink
Add existing_env_conf fixture to conftest.py (#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorothykiz1 authored Mar 7, 2022
1 parent a1f3840 commit 5e8c249
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 10 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from os.path import join
from asv import config
from asv import repo
from .test_workflow import generate_basic_conf


try:
import hglib
Expand Down Expand Up @@ -109,3 +111,11 @@ def two_branch_repo_case(request, tmpdir):
conf.project = join(tmpdir, "repo")
r = repo.get_repo(conf)
return dvcs, master, r, conf


@pytest.fixture
def existing_env_conf(tmpdir):
tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir)
conf.environment_type = "existing"
conf.pythons = ["same"]
return tmpdir, local, conf, machine_file
8 changes: 0 additions & 8 deletions test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ def basic_conf_with_subdir(tmpdir, dummy_packages):
return generate_basic_conf(tmpdir, 'some_subdir')


@pytest.fixture
def existing_env_conf(tmpdir):
tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir)
conf.environment_type = "existing"
conf.pythons = ["same"]
return tmpdir, local, conf, machine_file


def test_set_commit_hash(capsys, existing_env_conf):
tmpdir, local, conf, machine_file = existing_env_conf

Expand Down

0 comments on commit 5e8c249

Please sign in to comment.