Skip to content

Commit b85abdb

Browse files
committed
Fix some cleanup regressions.
1 parent e85fc6c commit b85abdb

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

tests/conftest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
def pytest_ignore_collect(path, config):
2-
basename = path.basename
1+
from pathlib import Path
32

4-
if 'pytestsupport' in basename:
3+
4+
def pytest_ignore_collect(collection_path: Path, config):
5+
if 'pytestsupport' in collection_path.__fspath__():
56
return True

tests/test_aspectlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def test_weave_wrong_module():
447447
"Setting test_aspectlib.MissingGlobal to <class 'test_aspectlib.MissingGlobal'>. "
448448
'There was no previous definition, probably patching the wrong module.',
449449
),
450-
{},
450+
{'stacklevel': 2},
451451
)
452452
]
453453

tests/test_integrations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_mock_builtin_os():
4444
def test_record_warning():
4545
with aspectlib.weave('warnings.warn', record):
4646
warnings.warn('crap', stacklevel=1)
47-
assert warnings.warn.calls == [(None, ('crap',), {})]
47+
assert warnings.warn.calls == [(None, ('crap',), {'stacklevel': 1})]
4848

4949

5050
@pytest.mark.skipif(not hasattr(os, 'fork'), reason='os.fork not available')

0 commit comments

Comments
 (0)