From 5f90f0b3103888bd2aaab19fa3d51651ee1a8e7c Mon Sep 17 00:00:00 2001 From: dorothykiz1 Date: Wed, 9 Mar 2022 21:56:40 +0300 Subject: [PATCH 1/2] move fixture --- test/conftest.py | 14 ++++++++++++++ test/test_show.py | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/test/conftest.py b/test/conftest.py index e7025d4b9..a49ccc22d 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -290,3 +290,17 @@ def benchmarks_fixture(tmpdir): commit_hash = repo.get_hash_from_name(repo.get_branch_name()) return conf, repo, envs, commit_hash + + +@pytest.fixture +def show_fixture(tmpdir, example_results): + tmpdir = str(tmpdir) + os.chdir(tmpdir) + + conf = config.Config.from_json( + {'results_dir': example_results, + 'repo': tools.generate_test_repo(tmpdir).path, + 'project': 'asv', + 'environment_type': "shouldn't matter what"}) + + return conf diff --git a/test/test_show.py b/test/test_show.py index db51db37f..2e2828bc5 100644 --- a/test/test_show.py +++ b/test/test_show.py @@ -12,19 +12,6 @@ BENCHMARK_DIR = abspath(join(dirname(__file__), 'example_results')) MACHINE_FILE = abspath(join(dirname(__file__), 'asv-machine.json')) -@pytest.fixture -def show_fixture(tmpdir, example_results): - tmpdir = str(tmpdir) - os.chdir(tmpdir) - - conf = config.Config.from_json( - {'results_dir': example_results, - 'repo': tools.generate_test_repo(tmpdir).path, - 'project': 'asv', - 'environment_type': "shouldn't matter what"}) - - return conf - def test_show(capsys, show_fixture): conf = show_fixture From 4049d95a0c8a456b1c989a89671a9d5ac4050110 Mon Sep 17 00:00:00 2001 From: dorothykiz1 Date: Thu, 10 Mar 2022 00:55:04 +0300 Subject: [PATCH 2/2] Fix fixtures --- test/test_show.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test_show.py b/test/test_show.py index 2e2828bc5..74915defa 100644 --- a/test/test_show.py +++ b/test/test_show.py @@ -3,8 +3,6 @@ import textwrap from os.path import abspath, dirname, join -import pytest - from asv import config from . import tools