File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,10 @@ def minimum_python_version(self) -> str:
6060 This is used in specific testing scenarios where it would be either
6161 costly to run the tests for all `python_versions` or we need a single metric.
6262 """
63- return str (min ([Version .from_string (v ) for v in self .python_versions ]))
63+ versioned = [Version .from_string (v ) for v in self .python_versions ]
64+ min_version = min (versioned )
65+ index_min_version = versioned .index (min_version )
66+ return self .python_versions [index_min_version ]
6467
6568 @computed_field # type: ignore[misc]
6669 @property
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ def test_expansion_validation_fails_for_invalid_version():
5858
5959
6060def test_minimum_python_version ():
61- conf = BaseConfig (python_versions = ("5.5.5" , "1.1.1 " , "9.9.9" ))
62- assert conf .minimum_python_version == "1.1.1 "
61+ conf = BaseConfig (python_versions = ("5.5.5" , "1.10 " , "9.9.9" ))
62+ assert conf .minimum_python_version == "1.10 "
6363
6464
6565@pytest .mark .parametrize ("minimum_python_version" , ["3.10" , "3.10.5" ])
You can’t perform that action at this time.
0 commit comments