xavierfigueroav: > We would need some tests for this!
@pombredanne There are some tests now!
pombredanne: But this needs to be rebased too
diff --git a/spdx/config.py b/spdx/config.py
index 59a11b4..1d80666 100644
--- a/spdx/config.py
+++ b/spdx/config.py
@@ -34,7 +34,7 @@ def load_license_list(file_name):
     licenses_map = {}
     with codecs.open(file_name, 'rb', encoding='utf-8') as lics:
         licenses = json.load(lics)
-        version = licenses['licenseListVersion'].split('.')
+        version, _, _ = licenses['licenseListVersion'].split('-')
         for lic in licenses['licenses']:
             if lic.get('isDeprecatedLicenseId'):
                 continue
@@ -54,7 +54,7 @@ def load_exception_list(file_name):
     exceptions_map = {}
     with codecs.open(file_name, 'rb', encoding='utf-8') as excs:
         exceptions = json.load(excs)
-        version = exceptions['licenseListVersion'].split('.')
+        version, _, _  = exceptions['licenseListVersion'].split('-')
         for exc in exceptions['exceptions']:
             if exc.get('isDeprecatedLicenseId'):
                 continue
@@ -65,8 +65,8 @@ def load_exception_list(file_name):
     return version, exceptions_map
 
 
-(_major, _minor), LICENSE_MAP = load_license_list(_licenses)
-LICENSE_LIST_VERSION = Version(major=_major, minor=_minor)
+_version, LICENSE_MAP = load_license_list(_licenses)
+LICENSE_LIST_VERSION = Version.from_str(_version)
 
-(_major, _minor), EXCEPTION_MAP = load_exception_list(_exceptions)
-EXCEPTION_LIST_VERSION = Version(major=_major, minor=_minor)
\ No newline at end of file
+_version, EXCEPTION_MAP = load_exception_list(_exceptions)
+EXCEPTION_LIST_VERSION = Version.from_str(_version)

Version model fields must be integers but sometimes they aren't
**BACKGROUND INFORMATION**
`major` and `minor` fields of `Version` model are supposed to be integers and the class method `Version.from_str()` is responsible for assuring that.
https://github.com/spdx/tools-python/blob/301d72f6ae57c832c1da7f6402fa49b192de6810/spdx/version.py#L36-L45
If `license_list_version` field is absent when initializing a `CreationInfo` object, a default value is taken from the `config.py` file.
https://github.com/spdx/tools-python/blob/301d72f6ae57c832c1da7f6402fa49b192de6810/spdx/creationinfo.py#L131-L136
**THE ISSUE**
The default `Version` object described above is created assigning `major` and `minor` fields directly as string values.
https://github.com/spdx/tools-python/blob/301d72f6ae57c832c1da7f6402fa49b192de6810/spdx/config.py#L48-L49
`__lt__` method and parsers tests (expect integer values) may fail.
diff --git a/tests/test_config.py b/tests/test_config.py
new file mode 100644
index 0000000..3db5f6e
--- /dev/null
+++ b/tests/test_config.py
@@ -0,0 +1,43 @@
+from __future__ import absolute_import
+from __future__ import print_function
+from __future__ import unicode_literals
+
+import unittest
+from unittest import TestCase
+
+from spdx import config
+from spdx.version import Version
+
+class TestLicenseList(TestCase):
+
+    def test_load_license_list(self):
+        version, licenses_map = config.load_license_list(config._licenses)
+        assert version == '3.5'
+        # Test some instances in licenses_map
+        assert licenses_map['MIT License'] == 'MIT'
+        assert licenses_map['MIT'] == 'MIT License'
+        assert licenses_map['Apache License 2.0'] == 'Apache-2.0'
+        assert licenses_map['Apache-2.0'] == 'Apache License 2.0'
+        assert licenses_map['GNU General Public License v3.0 only'] == 'GPL-3.0-only'
+        assert licenses_map['GPL-3.0-only'] == 'GNU General Public License v3.0 only'
+    
+    def test_config_license_list_version_constant(self):
+        assert config.LICENSE_LIST_VERSION == Version(major=3, minor=5)
+
+    def test_load_exception_list(self):
+        version, exception_map = config.load_exception_list(config._exceptions)
+        assert version == '3.5'
+        # Test some instances in exception_map
+        assert exception_map['Bison exception 2.2'] == 'Bison-exception-2.2'
+        assert exception_map['Bison-exception-2.2'] == 'Bison exception 2.2'
+        assert exception_map['OpenVPN OpenSSL Exception'] == 'openvpn-openssl-exception'
+        assert exception_map['openvpn-openssl-exception'] == 'OpenVPN OpenSSL Exception'
+        assert exception_map['Qt GPL exception 1.0'] == 'Qt-GPL-exception-1.0'
+        assert exception_map['Qt-GPL-exception-1.0'] == 'Qt GPL exception 1.0'
+    
+    def test_config_exception_list_version_constant(self):
+        assert config.EXCEPTION_LIST_VERSION == Version(major=3, minor=5)
+
+
+if __name__ == '__main__':
+    unittest.main()

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup==1.2.2
iniconfig==2.1.0
isodate==0.7.2
packaging==24.2
pluggy==1.5.0
ply==3.11
pyparsing==3.2.3
pytest==8.3.5
rdflib==7.1.4
six==1.17.0
-e git+https://github.com/spdx/tools-python.git@276e30d5ddeae98e4cefb455b4d245506e6345b1#egg=spdx_tools
tomli==2.2.1

name: tools-python
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - exceptiongroup==1.2.2
      - iniconfig==2.1.0
      - isodate==0.7.2
      - packaging==24.2
      - pluggy==1.5.0
      - ply==3.11
      - pyparsing==3.2.3
      - pytest==8.3.5
      - rdflib==7.1.4
      - six==1.17.0
      - tomli==2.2.1
prefix: /opt/conda/envs/tools-python

tests/test_config.py::TestLicenseList::test_config_exception_list_version_constant tests/test_config.py::TestLicenseList::test_config_license_list_version_constant tests/test_config.py::TestLicenseList::test_load_exception_list tests/test_config.py::TestLicenseList::test_load_license_list
spdx/config.py
spdx/config.py