Skip to content

Commit ab1793a

Browse files
authored
Add version to test (#3699)
1 parent 11e33ed commit ab1793a

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

tests/test_args.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from importlib.metadata import version
23
from pathlib import Path
34

45
from pytest import MonkeyPatch
@@ -122,15 +123,11 @@ def test_config_file_parsing(
122123
handler = ArchConfigHandler()
123124
arch_config = handler.config
124125

125-
# the version is retrieved dynamically from an installed archinstall package
126-
# as there is no version present in the test environment we'll set it manually
127-
arch_config.version = '3.0.2'
128-
129126
# TODO: Use the real values from the test fixture instead of clearing out the entries
130127
arch_config.disk_config.device_modifications = [] # type: ignore[union-attr]
131128

132129
assert arch_config == ArchConfig(
133-
version='3.0.2',
130+
version=version('archinstall'),
134131
script='test_script',
135132
app_config=ApplicationConfiguration(
136133
bluetooth_config=BluetoothConfiguration(enabled=True),

0 commit comments

Comments
 (0)