From ca3a6675bcc9c073270a9b29f12f13b863db6170 Mon Sep 17 00:00:00 2001 From: Kenny Y <24802984+kenny-y-dev@users.noreply.github.com> Date: Sat, 27 May 2023 20:37:45 -0400 Subject: [PATCH] Add test coverage and authors name --- AUTHORS | 1 + testing/test_warnings.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/AUTHORS b/AUTHORS index 309088707..77d647126 100644 --- a/AUTHORS +++ b/AUTHORS @@ -197,6 +197,7 @@ Justice Ndou Justyna Janczyszyn Kale Kundert Kamran Ahmad +Kenny Y Karl O. Pinc Karthikeyan Singaravelan Katarzyna Jachim diff --git a/testing/test_warnings.py b/testing/test_warnings.py index 7b716bb45..4f9ef3728 100644 --- a/testing/test_warnings.py +++ b/testing/test_warnings.py @@ -777,6 +777,18 @@ class TestStackLevel: ) +def test_warning_on_testpaths_not_found(pytester: Pytester) -> None: + # Check for warning when testpaths set, but not found by glob + pytester.makeini( + """ + [pytest] + testpaths = absent + """ + ) + result = pytester.runpytest() + result.stdout.fnmatch_lines(["*ConfigWarning: testpaths defined*", "*1 warning*"]) + + def test_resource_warning(pytester: Pytester, monkeypatch: pytest.MonkeyPatch) -> None: # Some platforms (notably PyPy) don't have tracemalloc. # We choose to explicitly not skip this in case tracemalloc is not