Skip to content

Commit 1a8a84d

Browse files
committed
Rework a bit this test.
1 parent 682617c commit 1a8a84d

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

tests/sample5.pyx

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# cython: linetrace=True, language_level=3
2-
foo = bar = lambda x: x
2+
a = b = lambda x: x
33

44

5-
@foo
6-
@bar
5+
@a
6+
@b
77
def foo():
88
return 1
9+
10+
11+
def bar():
12+
foo()

tests/test_tracer.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -849,15 +849,15 @@ def foo():
849849
def test_source_cython(LineMatcher):
850850
pytest.importorskip('sample5')
851851
calls = []
852-
from sample5 import foo
852+
from sample5 import bar
853853

854854
with trace(action=lambda event: calls.extend(event.source.splitlines())):
855-
foo()
855+
bar()
856856

857857
lm = LineMatcher(calls)
858858
lm.fnmatch_lines(
859859
[
860-
'def foo():',
860+
'def bar():',
861861
' return 1',
862862
]
863863
)

tox.ini

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ deps =
4242
pytest
4343
pytest-benchmark
4444
cover: pytest-cov
45-
{cython,cover}: cython==3.0.10
45+
{py38,py39,py310,py311,py312}: cython==3.0.10
4646
manhole
4747
process-tests
4848
setuptools-scm
@@ -52,7 +52,8 @@ deps =
5252
tzdata
5353
ipdb
5454
commands =
55-
{py38,py39,py310,py311,py312}: python tests/setup.py clean --all build_ext --force --inplace
55+
{py38,py39,py310,py311,py312}: python tests/setup.py clean --all
56+
{py38,py39,py310,py311,py312}: python tests/setup.py build_ext --force --inplace
5657
cover: python setup.py clean --all build_ext --force --inplace
5758
nocov: {posargs:pytest -vv --ignore=src}
5859
cover: {posargs:pytest --cov --cov-report=term-missing -vv}

0 commit comments

Comments
 (0)