Skip to content

Commit 01070d0

Browse files
committed
Clean this up, and skip pth tests - it's hopeless to test pth behavior in a develop env with these nonstop packaging deprecations/feature deletions. Also reformat those ' [' 'backlog' ']' to something that ruff doesn't undo (the intention there was to avoid catching that in output matching from some tests).
1 parent c8415ac commit 01070d0

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ requires = [
55
"setuptools_scm>=3.3.1,!=4.0.0",
66
]
77
build-backend = "setuptools.build_meta"
8-
#build-backend = "backend"
9-
#backend-path = ["build_backend"]
108

119
[tool.setuptools_scm]
1210

tests/sample7args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def six():
4747
Backlog(
4848
stack=15,
4949
vars=True,
50-
action=DebugCallPrinter(' [' 'backlog' ']'),
50+
action=DebugCallPrinter(' [' + 'backlog' + ']'),
5151
function='five',
5252
).filter(~Q(function='six')),
5353
action=DebugCallPrinter,

tests/test_integration.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
pytest_plugins = ('pytester',)
3737

3838

39+
@pytest.mark.xfail('cover' in os.getenv('TOX_ENV_NAME', ''), reason='develop envs are incomplete')
3940
def test_pth_activation():
4041
module_name = os.path.__name__
4142
expected_module = '{0}'.format(module_name)
@@ -53,6 +54,7 @@ def test_pth_activation():
5354
assert expected_call.encode() in output
5455

5556

57+
@pytest.mark.xfail('cover' in os.getenv('TOX_ENV_NAME', ''), reason='develop envs are incomplete')
5658
def test_pth_sample4():
5759
env = dict(os.environ, PYTHONHUNTER='CodePrinter')
5860
env.pop('COVERAGE_PROCESS_START', None)
@@ -68,6 +70,7 @@ def test_pth_sample4():
6870
assert output
6971

7072

73+
@pytest.mark.xfail('cover' in os.getenv('TOX_ENV_NAME', ''), reason='develop envs are incomplete')
7174
def test_pth_sample2(LineMatcher):
7275
env = dict(os.environ, PYTHONHUNTER="module='__main__',action=CodePrinter")
7376
env.pop('COVERAGE_PROCESS_START', None)
@@ -370,6 +373,7 @@ def test_depth_limit(LineMatcher, depth):
370373
assert 'five' not in output
371374

372375

376+
@pytest.mark.xfail('cover' in os.getenv('TOX_ENV_NAME', ''), reason='develop envs are incomplete')
373377
@pytest.mark.parametrize('depth', [2, 3, 4], ids='depth_lt={}'.format)
374378
def test_depth_limit_subprocess(LineMatcher, depth):
375379
hunter_env = "action=CallPrinter,depth_lt={!r},kind_in=['call','return'],stdlib=0".format(depth + 1)
@@ -664,7 +668,7 @@ def test_backlog(LineMatcher, stack):
664668
size=19,
665669
stack=stack,
666670
vars=False,
667-
action=DebugCallPrinter(' [' 'backlog' ']', stream=buff),
671+
action=DebugCallPrinter(' [' + 'backlog' + ']', stream=buff),
668672
).filter(~Q(function='six')),
669673
action=DebugCallPrinter(stream=buff),
670674
):

tests/test_tracer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,9 @@ def test_backlog_specific(LineMatcher, size, stack, vars, condition, filter):
17691769
from sample7args import one
17701770

17711771
with trace(
1772-
Backlog(size=size, stack=stack, vars=vars, action=DebugCallPrinter(' [' 'backlog' ']', stream=buff), filter=filter, **condition),
1772+
Backlog(
1773+
size=size, stack=stack, vars=vars, action=DebugCallPrinter(' [' + 'backlog' + ']', stream=buff), filter=filter, **condition
1774+
),
17731775
action=DebugCallPrinter(stream=buff),
17741776
):
17751777
one()

0 commit comments

Comments
 (0)