From 888e9e82d2fa75e9b75274c3f59d4a97e729480f Mon Sep 17 00:00:00 2001 From: TanyaAgarwal28 <8979149361t@gmail.com> Date: Wed, 11 Oct 2023 12:35:14 +0530 Subject: [PATCH] Bug Fix 11282: config.getini returns an empty list for an option of type string absent in INI file --- testing/test_conftest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testing/test_conftest.py b/testing/test_conftest.py index 09d2cbed9..52df31dbd 100644 --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -240,6 +240,16 @@ def test_my_option(pytester: Pytester): ), encoding="utf-8", ) + # Create a simple test function + testdir.joinpath("test_my_option.py").write_text( + textwrap.dedent( + """\ + def test_example(my_option): + assert my_option is None + """ + ), + encoding="utf-8", + ) result = pytester.runpytest(str(testdir)) assert result.ret == 0 captured_stdout = result.stdout.str()