File tree 4 files changed +61
-7
lines changed
4 files changed +61
-7
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ addopts =
25
25
--ignore =src/pytest_benchmark/pep418.py
26
26
--doctest-modules
27
27
--doctest-glob =\*.rst
28
+ --nbmake
28
29
--tb =short
29
30
testpaths =
30
31
tests
Original file line number Diff line number Diff line change @@ -510,10 +510,12 @@ def pytest_runtest_setup(item):
510
510
@pytest .hookimpl (hookwrapper = True )
511
511
def pytest_runtest_makereport (item , call ):
512
512
outcome = yield
513
- fixture = hasattr (item , 'funcargs' ) and item .funcargs .get ('benchmark' )
513
+ fixture = None
514
+ if hasattr (item , 'funcargs' ):
515
+ fixture = item .funcargs .get ('benchmark' )
514
516
if fixture is not None and not isinstance (fixture , BenchmarkFixture ):
515
517
raise TypeError (
516
- f'unexpected type for `benchmark` in funcargs, { fixture !r} must be a BenchmarkFixture instance.'
518
+ f'unexpected type for `benchmark` in funcargs, { fixture !r} must be a BenchmarkFixture instance. '
517
519
'You should not use other plugins that define a `benchmark` fixture, or return and unexpected value if you do redefine it.'
518
520
)
519
521
if fixture :
Original file line number Diff line number Diff line change
1
+ {
2
+ "cells" : [
3
+ {
4
+ "cell_type" : " code" ,
5
+ "id" : " initial_id" ,
6
+ "metadata" : {
7
+ "collapsed" : true ,
8
+ "ExecuteTime" : {
9
+ "end_time" : " 2024-10-30T00:19:36.564972Z" ,
10
+ "start_time" : " 2024-10-30T00:19:36.560019Z"
11
+ }
12
+ },
13
+ "source" : [
14
+ " a = 1\n " ,
15
+ " print(a)"
16
+ ],
17
+ "outputs" : [
18
+ {
19
+ "name" : " stdout" ,
20
+ "output_type" : " stream" ,
21
+ "text" : [
22
+ " 1\n "
23
+ ]
24
+ }
25
+ ],
26
+ "execution_count" : 1
27
+ }
28
+ ],
29
+ "metadata" : {
30
+ "kernelspec" : {
31
+ "display_name" : " Python 3" ,
32
+ "language" : " python" ,
33
+ "name" : " python3"
34
+ },
35
+ "language_info" : {
36
+ "codemirror_mode" : {
37
+ "name" : " ipython" ,
38
+ "version" : 2
39
+ },
40
+ "file_extension" : " .py" ,
41
+ "mimetype" : " text/x-python" ,
42
+ "name" : " python" ,
43
+ "nbconvert_exporter" : " python" ,
44
+ "pygments_lexer" : " ipython2" ,
45
+ "version" : " 2.7.6"
46
+ }
47
+ },
48
+ "nbformat" : 4 ,
49
+ "nbformat_minor" : 5
50
+ }
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ usedevelop =
40
40
cover: true
41
41
nocov: false
42
42
deps =
43
- pytest-instafail ==0.4.2
44
- xdist: pytest-xdist ==2.5.0
43
+ pytest-instafail ==0.5.0
44
+ xdist: pytest-xdist ==3.6.1
45
45
pytest71: pytest ==7.1.3
46
46
pytest72: pytest ==7.2.2
47
47
pytest73: pytest ==7.3.2
@@ -54,12 +54,13 @@ deps =
54
54
cover: coverage
55
55
pypy: jitviewer
56
56
aspectlib ==2.0.0
57
- pygal ==3.0.4
57
+ pygal ==3.0.5
58
58
pygaljs ==1.0.2
59
- freezegun ==1.3 .1
59
+ freezegun ==1.5 .1
60
60
hunter
61
61
setuptools
62
- elasticsearch ==8.11.1
62
+ elasticsearch ==8.15.1
63
+ nbmake ==1.5.4
63
64
commands =
64
65
nocov: {posargs:pytest -vv --ignore =src}
65
66
cover: {posargs:pytest --cov --cov-report =term-missing --cov-report =xml -vv}
You can’t perform that action at this time.
0 commit comments