Skip to content

Commit

Permalink
CLN: Fix pep8 issues on test/test_find.py (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucyJimenez committed Mar 15, 2022
1 parent 4d89ca3 commit 3af84b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ exclude = setup.py,
test/test_runner.py,
test/test_run.py,
test/test_rm.py,
test/test_continuous.py,
test/test_find.py
test/test_continuous.py

[isort]
line_length = 99
Expand Down
20 changes: 13 additions & 7 deletions test/test_find.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst

import os
import sys

import pytest

Expand All @@ -27,7 +26,9 @@ def test_find(capfd, tmpdir):
(6, 6),
]

tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir, values=values, dummy_packages=False)
tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir,
values=values,
dummy_packages=False)

# Test find at least runs
tools.run_asv_with_conf(conf, 'find', "master~5..master", "params_examples.track_find_test",
Expand All @@ -50,7 +51,9 @@ def test_find_timeout(capfd, tmpdir):
(1, -1)
]

tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir, values=values, dummy_packages=False)
tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir,
values=values,
dummy_packages=False)

# Test find at least runs
tools.run_asv_with_conf(conf, 'find', "-e", "master", "params_examples.time_find_test_timeout",
Expand All @@ -75,15 +78,18 @@ def test_find_inverted(capfd, tmpdir):
(6, 1),
]


tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir, values=values, dummy_packages=False)
tools.run_asv_with_conf(*[conf, 'find',"-i", f"master~4..master", "params_examples.track_find_test"],
tmpdir, local, conf, machine_file = generate_basic_conf(tmpdir,
values=values,
dummy_packages=False)
tools.run_asv_with_conf(*[conf, 'find',
"-i", "master~4..master",
"params_examples.track_find_test"],
_machine_file=machine_file)

output, err = capfd.readouterr()

regression_hash = check_output(
[which('git'), 'rev-parse', f'master^'], cwd=conf.repo)
[which('git'), 'rev-parse', 'master^'], cwd=conf.repo)

formatted = "Greatest improvement found: {0}".format(regression_hash[:8])
assert formatted in output

0 comments on commit 3af84b8

Please sign in to comment.