Skip to content

Commit 8e30fe3

Browse files
committed
Move the test in the right module (with the windows support crap).
1 parent 2b56483 commit 8e30fe3

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

tests/test_benchmark.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,26 +1209,3 @@ def test_columns(testdir):
12091209
'------*',
12101210
]
12111211
)
1212-
1213-
1214-
def test_compare_csv(testdir):
1215-
test = testdir.makepyfile("""
1216-
import pytest
1217-
@pytest.mark.parametrize("arg", ["foo", "bar"])
1218-
def test1(benchmark, arg):
1219-
def func():
1220-
print(arg)
1221-
benchmark(func)
1222-
def test2(benchmark):
1223-
def func():
1224-
print("foo")
1225-
benchmark(func)
1226-
""")
1227-
result = testdir.runpytest_subprocess('--benchmark-autosave', test)
1228-
result.stderr.fnmatch_lines(
1229-
[
1230-
'Saved benchmark data in: *',
1231-
]
1232-
)
1233-
result = testdir.run('py.test-benchmark', 'compare', '--csv')
1234-
result.stderr.fnmatch_lines(['Generated csv: *.csv'])

tests/test_cli.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,26 @@ def test_compare(testdir, name, name_pattern_generator):
234234
]
235235
)
236236
assert result.ret == 0
237+
238+
239+
def test_compare_csv(testdir):
240+
test = testdir.makepyfile("""
241+
import pytest
242+
@pytest.mark.parametrize("arg", ["foo", "bar"])
243+
def test1(benchmark, arg):
244+
def func():
245+
print(arg)
246+
benchmark(func)
247+
def test2(benchmark):
248+
def func():
249+
print("foo")
250+
benchmark(func)
251+
""")
252+
result = testdir.runpytest_subprocess('--benchmark-autosave', test)
253+
result.stderr.fnmatch_lines(
254+
[
255+
'Saved benchmark data in: *',
256+
]
257+
)
258+
result = testdir.run('py.test-benchmark', 'compare', '--csv')
259+
result.stderr.fnmatch_lines(['Generated csv: *.csv'])

0 commit comments

Comments
 (0)