Bug Fix 11282: config.getini returns an empty list for an option of type string absent in INI file

This commit is contained in:
TanyaAgarwal28 2023-10-11 12:35:14 +05:30
parent 6aa93196cf
commit 888e9e82d2
1 changed files with 10 additions and 0 deletions

View File

@ -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()