From 6e9a2a431c7d240f123a4f8e6cbbbc6da52fef03 Mon Sep 17 00:00:00 2001 From: "Mark E. Fuller" Date: Wed, 10 Jul 2024 10:27:19 +0200 Subject: [PATCH 1/2] minor errors in test comments --- tests/test_methods.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_methods.py b/tests/test_methods.py index 40b57916..bff53561 100644 --- a/tests/test_methods.py +++ b/tests/test_methods.py @@ -11,7 +11,7 @@ def hello_test(): """ This defines the expected usage, which can then be used in various test cases. - Pytest will not execute this code directly, since the function does not contain the suffex "test" + Pytest will not execute this code directly, since the function does not contain the prefix "test" """ hello_world() @@ -26,7 +26,7 @@ def test_hello(unit_test_mocks: None): def test_int_hello(): """ - This test is marked implicitly as an integration test because the name contains "_init_" + This test is marked implicitly as an integration test because the name contains "_int_" https://docs.pytest.org/en/6.2.x/example/markers.html#automatically-adding-markers-based-on-test-names """ hello_test() From bc042c7408672d706bda5dc1ae335690cb91af8f Mon Sep 17 00:00:00 2001 From: "Mark E. Fuller" Date: Wed, 10 Jul 2024 10:28:27 +0200 Subject: [PATCH 2/2] make test actually test and drop unneeded dep --- tests/conftest.py | 2 -- tests/test_methods.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index ce475219..27dbff74 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,8 +10,6 @@ from __future__ import annotations -from typing import List - import pytest from _pytest.nodes import Item diff --git a/tests/test_methods.py b/tests/test_methods.py index bff53561..bf2d41f1 100644 --- a/tests/test_methods.py +++ b/tests/test_methods.py @@ -13,7 +13,7 @@ def hello_test(): This defines the expected usage, which can then be used in various test cases. Pytest will not execute this code directly, since the function does not contain the prefix "test" """ - hello_world() + assert hello_world() == "string-0" def test_hello(unit_test_mocks: None):