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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user