Fixed an issue when saving libraries in new project results in error "No option 'lib_deps' in section" // Resolve #3442

This commit is contained in:
Ivan Kravets
2020-03-27 13:34:14 +02:00
parent 1b0810ec87
commit e92b498b68
3 changed files with 14 additions and 1 deletions
+8
View File
@@ -121,11 +121,19 @@ def test_defaults(config):
assert config.get_optional_dir("core") == os.path.join(
os.path.expanduser("~"), ".platformio"
)
assert config.get("strict_ldf", "lib_deps", ["Empty"]) == ["Empty"]
assert config.get("env:extra_2", "lib_compat_mode") == "soft"
assert config.get("env:extra_2", "build_type") == "release"
assert config.get("env:extra_2", "build_type", None) is None
assert config.get("env:extra_2", "lib_archive", "no") is False
config.expand_interpolations = False
with pytest.raises(
InvalidProjectConfError, match="No option 'lib_deps' in section: 'strict_ldf'"
):
assert config.get("strict_ldf", "lib_deps", ["Empty"]) == ["Empty"]
config.expand_interpolations = True
def test_sections(config):
with pytest.raises(ConfigParser.NoSectionError):