Skip to content

Commit

Permalink
Handle failure to detect the distribution in test_parse_config()
Browse files Browse the repository at this point in the history
If /usr/lib/os-release isn't available, we can't detect the current
distribution, so let's make sure we handle that scenario as well by
checking for Distribution.custom instead of None.

Fixes #2921
  • Loading branch information
DaanDeMeyer authored and behrmann committed Jul 29, 2024
1 parent b3bbeaa commit 8917eee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_parse_config(tmp_path: Path) -> None:

# Empty values on the CLIs resets non-collection based settings to their defaults and collection based settings to
# empty collections.
assert config.distribution == detect_distribution()[0]
assert config.distribution == (detect_distribution()[0] or Distribution.custom)
assert "MY_KEY" not in config.environment
assert "my.cred" not in config.credentials
assert config.repositories == []
Expand Down

0 comments on commit 8917eee

Please sign in to comment.